結果

問題 No.18 うーさー暗号
ユーザー 夕日夕日
提出日時 2021-06-28 15:18:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 28 ms / 5,000 ms
コード長 260 bytes
コンパイル時間 94 ms
コンパイル使用メモリ 10,588 KB
実行使用メモリ 9,176 KB
最終ジャッジ日時 2023-09-07 18:24:58
合計ジャッジ時間 1,152 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
9,020 KB
testcase_01 AC 26 ms
8,980 KB
testcase_02 AC 25 ms
8,948 KB
testcase_03 AC 28 ms
9,064 KB
testcase_04 AC 27 ms
9,048 KB
testcase_05 AC 26 ms
9,176 KB
testcase_06 AC 27 ms
9,000 KB
testcase_07 AC 28 ms
9,160 KB
testcase_08 AC 28 ms
9,104 KB
testcase_09 AC 27 ms
9,100 KB
testcase_10 AC 25 ms
9,164 KB
testcase_11 AC 26 ms
8,992 KB
testcase_12 AC 26 ms
9,112 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import string
a = list(input())
b=list(string.ascii_uppercase)
b.reverse()
e = 1
f = ""
for i in a:
    d=(b.index(i)) + e
    if d < 25:
        f += b[d]
    else :
        while d >= 26:
            d -= 26
        f += b[d]
            
    e += 1
print(f)
0