結果

問題 No.1455 拡張ROTN
ユーザー roarisroaris
提出日時 2021-03-31 22:00:22
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 624 bytes
コンパイル時間 279 ms
コンパイル使用メモリ 87,140 KB
実行使用メモリ 80,056 KB
最終ジャッジ日時 2023-08-22 01:45:48
合計ジャッジ時間 3,918 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
71,704 KB
testcase_01 AC 86 ms
71,524 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 96 ms
77,308 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 96 ms
77,296 KB
testcase_13 RE -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 90 ms
77,300 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 RE -
testcase_23 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
from collections import *

def forward(s):
    if '0'<=s<'9':
        return str((int(s)+1))
    elif s=='9':
        return 'CpCzNkSuTbEoA'
    elif 'a'<=s<='z':
        return chr((ord(s)-ord('a')+1)%26+ord('a'))
    else:
        return chr((ord(s)-ord('A')+1)%26+ord('A'))

S = input()[:-1]
N = int(input())

for i in range(min(15, N)):
    T = []
    
    for j in range(len(S)):
        T.append(forward(S[j]))
    
    S = ''.join(T)

if N>15:
    S = list(S)
    
    for i in range(len(S)):
        for j in range((N-15)%26):
            S[j] = forward(S[j])

print(''.join(S))
0