結果
問題 |
No.18 うーさー暗号
|
ユーザー |
|
提出日時 | 2017-10-29 17:07:35 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 583 bytes |
コンパイル時間 | 320 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-11-22 05:19:46 |
合計ジャッジ時間 | 1,106 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 RE * 8 |
ソースコード
str_list = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ") def main(): S = input() i = 1 for s in list(S): print(get_str(i, s), end='') i += 1 print() def get_str(index, value): value_index = str_list.index(value) result_index = value_index - index if result_index < 0: result_index += 26 if result_index < 0: result_index += 26 if result_index < 0: result_index += 26 return str_list[result_index] else: return str_list[result_index] if __name__ == '__main__': main()