結果
問題 | No.1455 拡張ROTN |
ユーザー |
![]() |
提出日時 | 2022-07-04 21:47:53 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 33 ms / 2,000 ms |
コード長 | 452 bytes |
コンパイル時間 | 121 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-12-14 15:29:42 |
合計ジャッジ時間 | 1,694 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 |
ソースコード
T=["" for i in range(26)]T[0] = "CpCzNkSuTbEoA";for i in range(1,26):for c in T[i-1]:if c.isupper():T[i]+=chr(65+(ord(c)-65+1)%26)else:T[i]+=chr(97+(ord(c)-97+1)%26)S=input()N=int(input())for c in S:if c.isupper():print(end=chr(65+(ord(c)-65+N)%26))elif c.islower():print(end=chr(97+(ord(c)-97+N)%26))elif 10>int(c)+N:print(end=str(int(c)+N))else:print(T[(N+int(c)-10)%26],end="")print()