結果

問題 No.18 うーさー暗号
ユーザー yuki2006yuki2006
提出日時 2017-10-14 19:02:52
言語 Python2
(2.7.18)
結果
AC  
実行時間 16 ms / 5,000 ms
コード長 500 bytes
コンパイル時間 654 ms
コンパイル使用メモリ 6,520 KB
実行使用メモリ 5,988 KB
最終ジャッジ日時 2023-09-21 12:51:39
合計ジャッジ時間 1,248 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
5,812 KB
testcase_01 AC 10 ms
5,944 KB
testcase_02 AC 11 ms
5,976 KB
testcase_03 AC 16 ms
5,896 KB
testcase_04 AC 12 ms
5,988 KB
testcase_05 AC 12 ms
5,892 KB
testcase_06 AC 14 ms
5,968 KB
testcase_07 AC 14 ms
5,952 KB
testcase_08 AC 14 ms
5,888 KB
testcase_09 AC 13 ms
5,840 KB
testcase_10 AC 11 ms
5,812 KB
testcase_11 AC 11 ms
5,896 KB
testcase_12 AC 13 ms
5,936 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

alphs=['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
S = raw_input()
ans=[]

for i in range(len(S)):
    for j in range(len(alphs)):
        if S[i]==alphs[j]:
            p = i
            if p>=len(alphs):
                set = int(p/len(alphs))
                p -= set*len(alphs)
            else:
                pass
            dcrpt = alphs[j-p-1]
            ans.append(dcrpt)
        else:
            continue

print "".join(ans)
0