結果

問題 No.18 うーさー暗号
ユーザー zombietanzombietan
提出日時 2016-04-28 20:38:17
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 19 ms / 5,000 ms
コード長 281 bytes
コンパイル時間 93 ms
コンパイル使用メモリ 10,704 KB
実行使用メモリ 8,448 KB
最終ジャッジ日時 2023-09-21 12:15:05
合計ジャッジ時間 1,097 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
8,324 KB
testcase_01 AC 18 ms
8,408 KB
testcase_02 AC 18 ms
8,300 KB
testcase_03 AC 19 ms
8,384 KB
testcase_04 AC 18 ms
8,328 KB
testcase_05 AC 18 ms
8,364 KB
testcase_06 AC 19 ms
8,388 KB
testcase_07 AC 19 ms
8,448 KB
testcase_08 AC 19 ms
8,384 KB
testcase_09 AC 18 ms
8,308 KB
testcase_10 AC 18 ms
8,376 KB
testcase_11 AC 18 ms
8,320 KB
testcase_12 AC 19 ms
8,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import deque
S = list(input())
chr_list = [chr(i) for i in range(65,65+26)]

decord = []
for i, char in enumerate(S,1):
    r = deque(chr_list)
    idx = chr_list.index(char)
    r.rotate(i)
    deco_chr = r[idx]
    decord.append(deco_chr)

print(''.join(decord))
0