結果
| 問題 | No.164 ちっちゃくないよ!! |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-08-29 17:20:05 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 44 ms / 2,000 ms |
| コード長 | 794 bytes |
| コンパイル時間 | 178 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-09-13 19:29:15 |
| 合計ジャッジ時間 | 1,252 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
ソースコード
N = int(input())
l_ans = []
for i in range(N):
S = input()
l = list(S)
l = [10 if x == "A" else 11 if x == "B" else 12 if x == "C" else 13 if x == "D" else 14 if x == "E" else 15 if x == "F" else 16 if x == "G" else 17 if x == "H" else 18 if x == "I" else 19 if x == "J" else 20 if x == "K" else 21 if x == "L" else 22 if x == "M" else 23 if x == "N" else 24 if x == "O" else 25 if x == "P" else 26 if x == "Q" else 27 if x == "R" else 28 if x == "S" else 29 if x == "T" else 30 if x == "U" else 31 if x == "V" else 32 if x == "W" else 33 if x == "X" else 34 if x == "Y" else 35 if x == "Z" else int(x) for x in l]
l_max = max(l)
tei = l_max + 1
l.reverse()
ans = 0
for i in range(len(l)):
ans += tei ** i * l[i]
l_ans.append(ans)
print(min(l_ans))