結果

問題 No.1455 拡張ROTN
ユーザー cpcznksutbeoacpcznksutbeoa
提出日時 2021-03-25 22:15:26
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 88 ms / 2,000 ms
コード長 434 bytes
コンパイル時間 264 ms
コンパイル使用メモリ 87,144 KB
実行使用メモリ 76,688 KB
最終ジャッジ日時 2023-08-19 15:41:50
合計ジャッジ時間 3,110 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,420 KB
testcase_01 AC 68 ms
71,104 KB
testcase_02 AC 88 ms
76,528 KB
testcase_03 AC 79 ms
76,220 KB
testcase_04 AC 85 ms
76,496 KB
testcase_05 AC 75 ms
76,240 KB
testcase_06 AC 83 ms
76,688 KB
testcase_07 AC 80 ms
76,260 KB
testcase_08 AC 80 ms
76,356 KB
testcase_09 AC 75 ms
76,268 KB
testcase_10 AC 69 ms
71,272 KB
testcase_11 AC 71 ms
71,516 KB
testcase_12 AC 75 ms
76,260 KB
testcase_13 AC 69 ms
71,316 KB
testcase_14 AC 73 ms
76,200 KB
testcase_15 AC 68 ms
71,348 KB
testcase_16 AC 69 ms
71,064 KB
testcase_17 AC 69 ms
71,060 KB
testcase_18 AC 74 ms
76,192 KB
testcase_19 AC 73 ms
76,124 KB
testcase_20 AC 69 ms
71,384 KB
testcase_21 AC 71 ms
71,304 KB
testcase_22 AC 68 ms
71,552 KB
testcase_23 AC 75 ms
76,148 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S=input()
K=int(input())
for i in range(min(K,10)):
  T=""
  for c in S:
    if c.isupper():
      T+=chr((ord(c)-65+1)%26+65)
    elif c.islower():
      T+=chr((ord(c)-97+1)%26+97)
    elif c=='9':
      T+="CpCzNkSuTbEoA"
    else:
      T+=str(int(c)+1)
  S=T
if K<=10:
  print(S)
else:
  for c in S:
    if c.isupper():
      print(end=chr((ord(c)-65+K-10)%26+65))
    else:
      print(end=chr((ord(c)-97+K-10)%26+97))
  print()
0