結果

問題 No.1455 拡張ROTN
ユーザー googol_S0googol_S0
提出日時 2021-03-31 21:27:06
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 87 ms / 2,000 ms
コード長 570 bytes
コンパイル時間 331 ms
コンパイル使用メモリ 87,128 KB
実行使用メモリ 76,232 KB
最終ジャッジ日時 2023-08-21 23:21:58
合計ジャッジ時間 3,453 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,504 KB
testcase_01 AC 68 ms
71,296 KB
testcase_02 AC 87 ms
75,948 KB
testcase_03 AC 83 ms
75,768 KB
testcase_04 AC 83 ms
75,952 KB
testcase_05 AC 81 ms
75,920 KB
testcase_06 AC 81 ms
76,044 KB
testcase_07 AC 83 ms
75,792 KB
testcase_08 AC 82 ms
75,952 KB
testcase_09 AC 81 ms
76,060 KB
testcase_10 AC 74 ms
75,888 KB
testcase_11 AC 76 ms
75,956 KB
testcase_12 AC 78 ms
76,232 KB
testcase_13 AC 67 ms
71,436 KB
testcase_14 AC 78 ms
75,940 KB
testcase_15 AC 76 ms
76,128 KB
testcase_16 AC 77 ms
76,176 KB
testcase_17 AC 76 ms
75,968 KB
testcase_18 AC 78 ms
75,944 KB
testcase_19 AC 81 ms
75,956 KB
testcase_20 AC 78 ms
75,740 KB
testcase_21 AC 81 ms
76,132 KB
testcase_22 AC 69 ms
71,440 KB
testcase_23 AC 80 ms
76,072 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S=list(input())
N=int(input())
def f(x):
  for i in range(len(x)):
    if 'a'<=x[i]<='z':
      if x[i]=='z':
        x[i]='a'
      else:
        x[i]=chr(ord(x[i])+1)
    elif 'A'<=x[i]<='Z':
      if x[i]=='Z':
        x[i]='A'
      else:
        x[i]=chr(ord(x[i])+1)
    else:
      if x[i]=='9':
        x[i]='CpCzNkSuTbEoA'
      else:
        x[i]=chr(ord(x[i])+1)
  return ''.join(x)

if N<=50:
  for i in range(N):
    S=list(f(S))
  print(''.join(S))
  exit()
for i in range(50):
  S=list(f(S))
N=(N-50)%26
for i in range(N):
  S=list(f(S))
print(''.join(S))
0