結果
問題 | No.1455 拡張ROTN |
ユーザー |
![]() |
提出日時 | 2021-03-31 21:21:05 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 48 ms / 2,000 ms |
コード長 | 570 bytes |
コンパイル時間 | 608 ms |
コンパイル使用メモリ | 82,164 KB |
実行使用メモリ | 62,568 KB |
最終ジャッジ日時 | 2024-12-15 14:21:04 |
合計ジャッジ時間 | 2,507 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 |
ソースコード
s=input()n=int(input())cnt1=["CpCzNkSuTbEoA"]for i in range(150):ans=""s1=cnt1[-1]for j in range(len(s1)):a=ord(s1[j])if a<92:ans+=chr(65+(a-65+1)%26)else:ans+=chr(97+(a-97+1)%26)cnt1.append(ans)ans=""m=n%26k=n%10for i in range(len(s)):a=ord(s[i])if a<65:if int(s[i])+n>9:ans+=cnt1[(int(s[i])+n-10)%26]else:ans+=str((int(s[i])+k)%10)elif a<92:ans+=chr(65+(a-65+m)%26)else:ans+=chr(97+(a-97+m)%26)print(ans)