解密代码:
cnt = 1
while True:
try:
s = ''
while True:
s0 = input('More> ' if s else 'I%03d> ' % cnt)
try:
if s0:
int(s0)
elif not s:
continue
s += s0
if len(s0) < 50:
break
except:
raise
s = int(s, 8)
t = []
while s:
t += [s % 96]
s //= 96
if t[0] != 95 or t[-1] != 95:
raise ValueError('Illegal encoded string')
t.pop(0)
t.pop()
print('O', cnt, sep='', end='> ')
for i in t:
print(end=chr(i + 32))
print()
except:
print('ERROR')
cnt += 1