結果

問題 No.1455 拡張ROTN
ユーザー 萩3萩3
提出日時 2021-05-01 09:28:45
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 575 bytes
コンパイル時間 560 ms
コンパイル使用メモリ 87,088 KB
実行使用メモリ 278,372 KB
最終ジャッジ日時 2023-09-26 21:56:29
合計ジャッジ時間 4,963 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 87 ms
75,988 KB
testcase_01 AC 88 ms
71,848 KB
testcase_02 TLE -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections

s = input()
n = int(input())
trans = [None]*256
trans[ord('9')] = [ord(c) for c in 'CpCzNkSuTbEoA']
trans[ord('z')] = [ord('a')]
trans[ord('Z')] = [ord('A')]
for i in range(9):
    trans[ord(str(i))] = [ord(str(i+1))]

ord_a = ord('a')
ord_A = ord('A')
for i in range(25):
    trans[ord_a+i] = [ord_a+i+1]
    trans[ord_A+i] = [ord_A+i+1]

deq = collections.deque([ord(c) for c in s])
loop = n if n<=9 else 10 + (n-10)%26
for _ in range(n):
    for _ in range(len(deq)):
        deq.extend(trans[deq.popleft()])

print(*[chr(code) for code in deq],sep='')
0