結果
| 問題 | No.18 うーさー暗号 |
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-03-20 21:03:00 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 38 ms / 5,000 ms |
| コード長 | 254 bytes |
| コンパイル時間 | 229 ms |
| コンパイル使用メモリ | 82,888 KB |
| 実行使用メモリ | 53,712 KB |
| 最終ジャッジ日時 | 2025-03-20 21:03:14 |
| 合計ジャッジ時間 | 1,146 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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))
lam6er