結果

問題 No.18 うーさー暗号
ユーザー ktshunktshun
提出日時 2015-06-01 16:00:06
言語 Python2
(2.7.18)
結果
RE  
実行時間 -
コード長 285 bytes
コンパイル時間 319 ms
コンパイル使用メモリ 6,632 KB
実行使用メモリ 6,048 KB
最終ジャッジ日時 2023-09-20 18:19:26
合計ジャッジ時間 977 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
5,912 KB
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding:utf-8 -*-

if __name__ == "__main__":
	s = list(raw_input())
	al = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
	al = list(al)
	for i in xrange(len(s)):
		num = al.index(s[i])
		num -= (i+1) % 27
		if num < 0:
			num += 27
		elif num > 26:
			num -= 27
		s[i] = al[num]
	print ''.join(s)
0