結果
問題 | No.1455 拡張ROTN |
ユーザー |
|
提出日時 | 2021-03-31 22:26:44 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 41 ms / 2,000 ms |
コード長 | 667 bytes |
コンパイル時間 | 130 ms |
コンパイル使用メモリ | 82,348 KB |
実行使用メモリ | 61,568 KB |
最終ジャッジ日時 | 2024-12-15 19:53:40 |
合計ジャッジ時間 | 1,606 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 |
ソースコード
S = input()n = int(input())C = "CpCzNkSuTbEoA"ans = """123456789"a = [chr(i+ord("a")) for i in range(26)]A = [chr(i+ord("A")) for i in range(26)]for s in S:if s in a:ind = a.index(s)ans += a[(ind+n)%26]elif s in A:ind = A.index(s)ans += A[(ind+n)%26]else:s = int(s)if s+n <= 9:ans += str(s+n)else:nn = n+s-10for c in C:if c in a:ind = a.index(c)ans += a[(ind+nn)%26]if c in A:ind = A.index(c)ans += A[(ind+nn)%26]print(ans)