結果

問題 No.1455 拡張ROTN
ユーザー nohakai3nohakai3
提出日時 2022-07-04 21:47:29
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
WA  
実行時間 -
コード長 496 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 10,840 KB
実行使用メモリ 7,992 KB
最終ジャッジ日時 2023-08-21 06:12:11
合計ジャッジ時間 1,479 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 RE -
testcase_02 AC 15 ms
7,832 KB
testcase_03 AC 15 ms
7,764 KB
testcase_04 AC 15 ms
7,992 KB
testcase_05 AC 15 ms
7,840 KB
testcase_06 AC 16 ms
7,836 KB
testcase_07 AC 15 ms
7,976 KB
testcase_08 AC 16 ms
7,840 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

t=["" for i in range(26)]
t[0]="CpCzNkSuTbEoA"
for i in range(1,26):
    for c in t[i-1]:
        if c.isupper():
            t[i]+=chr(65+(ord(c)-65+1)%26)
        else:
            t[i]+=chr(97+(ord(c)-97+1)%26)
s=input()
n=int(input())
for c in s:
    if c.isupper():
        print(end=chr(65+(ord(c)-65+1)%26))
    elif c.islower():
        print(end=chr(97+(ord(c)-97+1)%26))
    elif 10>int(c)+n:
        print(end=str(int(c))+n)
    else:
        print(t[(n+int(c)-10)%26],end="")

print()
0