結果

問題 No.2034 Anti Lexicography
ユーザー ryusuke
提出日時 2022-08-30 20:20:36
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 275 bytes
コンパイル時間 257 ms
コンパイル使用メモリ 82,000 KB
実行使用メモリ 92,196 KB
最終ジャッジ日時 2024-11-07 14:16:02
合計ジャッジ時間 3,148 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict

n = int(input())
s = input()

d = defaultdict(int)
rev_d = defaultdict(int)
for i, j in enumerate("abcdefghijklmnopqrstuvwxyz"):
    d[j] = i
    rev_d[i] = j

ans = []
for i in s:
    ans.append(rev_d[26 - d[i] - 1])

print(*ans, sep='')
0