結果

問題 No.3132 暗号メッセージ
ユーザー ノフィー
提出日時 2025-05-15 10:43:15
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 32 ms / 2,000 ms
コード長 587 bytes
コンパイル時間 542 ms
コンパイル使用メモリ 12,288 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2025-05-15 10:43:17
合計ジャッジ時間 2,291 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

count = int(input())
list = input().split()

nums = [i for i in range(count)]
list2 = []
times = []
ans = []
ans_str = []

alp = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']

for i in list:
	remain = int(i)%26
	run = (int(i)-remain)/26
	
	list2.append(remain)
	times.append(run)

while True:
	if list2 == []:
		break
	
	place = times.index(min(times))
	ans.append(list2[place])
	
	list2.pop(place)
	times.pop(place)

for i in ans:
    ans_str.append(alp[i])

ans_str = "".join(ans_str)

print(ans_str)
0