結果

問題 No.2034 Anti Lexicography
ユーザー ThetaTheta
提出日時 2022-10-27 10:18:03
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 43 ms / 2,000 ms
コード長 386 bytes
コンパイル時間 670 ms
コンパイル使用メモリ 10,528 KB
実行使用メモリ 11,032 KB
最終ジャッジ日時 2023-09-18 03:48:52
合計ジャッジ時間 2,888 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
9,096 KB
testcase_01 AC 26 ms
9,096 KB
testcase_02 AC 27 ms
9,228 KB
testcase_03 AC 27 ms
9,100 KB
testcase_04 AC 26 ms
9,232 KB
testcase_05 AC 42 ms
10,768 KB
testcase_06 AC 42 ms
10,996 KB
testcase_07 AC 42 ms
10,792 KB
testcase_08 AC 43 ms
10,992 KB
testcase_09 AC 42 ms
11,032 KB
testcase_10 AC 43 ms
10,988 KB
testcase_11 AC 42 ms
11,016 KB
testcase_12 AC 42 ms
11,012 KB
testcase_13 AC 27 ms
9,244 KB
testcase_14 AC 26 ms
9,248 KB
testcase_15 AC 26 ms
9,216 KB
testcase_16 AC 26 ms
9,136 KB
testcase_17 AC 27 ms
9,328 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from string import ascii_lowercase


def main():
    N = int(input())
    S = input()

    forward = ascii_lowercase
    reverse = ascii_lowercase[::-1]

    letter_dict = {
        f_letter: r_letter for f_letter, r_letter in zip(forward, reverse)
    }

    backward_word = "".join(letter_dict[letter] for letter in S)
    print(backward_word)


if __name__ == "__main__":
    main()
0