結果

問題 No.18 うーさー暗号
ユーザー kisaragi211
提出日時 2018-01-24 21:43:55
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 29 ms / 5,000 ms
コード長 323 bytes
コンパイル時間 106 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-07-07 06:43:21
合計ジャッジ時間 1,030 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    s = input()
    for i,j in enumerate(s):
        i += 1
        if i > 26:
            i %= 26
        if ord(j) - i < ord('A'):
            print(chr(ord('Z') + 1 - (ord('A')+i-ord(j))), end='')
        else:
            print(chr(ord(j) - i), end='')
    print()
    
if __name__ == '__main__':
    main()
0