結果

問題 No.1455 拡張ROTN
ユーザー shotoyoo
提出日時 2021-03-31 21:07:19
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 515 bytes
コンパイル時間 240 ms
コンパイル使用メモリ 82,524 KB
実行使用メモリ 54,108 KB
最終ジャッジ日時 2024-12-15 09:19:46
合計ジャッジ時間 2,067 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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)+n<=9:
            return str(int(c)+n)
        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