結果
| 問題 | No.18 うーさー暗号 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-12-04 17:39:34 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 115 ms / 5,000 ms |
| コード長 | 469 bytes |
| 記録 | |
| コンパイル時間 | 387 ms |
| コンパイル使用メモリ | 20,824 KB |
| 実行使用メモリ | 15,360 KB |
| 最終ジャッジ日時 | 2026-03-28 21:48:15 |
| 合計ジャッジ時間 | 2,302 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 |
ソースコード
# -*- coding: utf-8 -*-
alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
def usa_code(idx, c):
alphabet_idx = alphabet.index(c)
while idx > 0:
alphabet_idx -= 1
if alphabet_idx < 0:
alphabet_idx = len(alphabet) - 1
idx -= 1
return alphabet[alphabet_idx]
if __name__ == '__main__':
input_str = input()
joint_str = ''
for idx, c in enumerate(input_str, 1):
joint_str += usa_code(idx, c)
print(joint_str)