跳到正文

闲话

Where is the picture? - 2

hyk2019约 2 分钟
原文
文章信息与版本

文章信息

发布
2024年11月13日
收录
2025年12月12日
更新
2026年11月7日
篇幅
约 2 分钟

版本

  1. v1当前

解密代码:

Python
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
原文