結果
問題 | No.18 うーさー暗号 |
ユーザー |
![]() |
提出日時 | 2025-03-20 18:47:40 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 39 ms / 5,000 ms |
コード長 | 254 bytes |
コンパイル時間 | 146 ms |
コンパイル使用メモリ | 82,816 KB |
実行使用メモリ | 53,876 KB |
最終ジャッジ日時 | 2025-03-20 18:48:55 |
合計ジャッジ時間 | 1,334 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 |
ソースコード
s = input().strip() result = [] for idx in range(len(s)): c = s[idx] shift = idx + 1 # 1-based index original_ord = ord(c) - ord('A') new_ord = (original_ord - shift) % 26 result.append(chr(new_ord + ord('A'))) print(''.join(result))