結果

問題 No.1455 拡張ROTN
ユーザー shotoyoo
提出日時 2021-03-31 21:05:38
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 512 bytes
コンパイル時間 171 ms
コンパイル使用メモリ 82,796 KB
実行使用メモリ 54,216 KB
最終ジャッジ日時 2024-12-15 09:12:13
合計ジャッジ時間 1,757 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 2 WA * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda : sys.stdin.readline().rstrip()

sys.setrecursionlimit(2*10**5+10)
write = lambda x: sys.stdout.write(x+"\n")
debug = lambda x: sys.stderr.write(x+"\n")

s = input()
n = int(input())
def sub(c):
    if c.isdigit():
        if int(c)<9:
            return str(int(c)+1)
        else:
            return "CpCzNkSuTbEoA"
    elif c.lower()==c:
        return chr((ord(c)-ord("a")+n)%26 + ord("a"))
    else:
        return chr((ord(c)-ord("A")+n)%26 + ord("A"))
print("".join(map(sub, s)))
0