結果
| 問題 |
No.164 ちっちゃくないよ!!
|
| コンテスト | |
| ユーザー |
togatoga
|
| 提出日時 | 2015-09-10 19:33:33 |
| 言語 | Python2 (2.7.18) |
| 結果 |
AC
|
| 実行時間 | 313 ms / 2,000 ms |
| コード長 | 641 bytes |
| コンパイル時間 | 90 ms |
| コンパイル使用メモリ | 6,912 KB |
| 実行使用メモリ | 6,912 KB |
| 最終ジャッジ日時 | 2024-10-13 14:18:05 |
| 合計ジャッジ時間 | 2,215 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
ソースコード
from collections import Counter
N = input()
V = []
bases = []
for i in range(N):
V.append(raw_input())
for i in range(2, 10):
bases.append(i)
for i in range(ord('A'), ord('Z') + 2):
bases.append(chr(i))
res = 1 << 80
for x in V:
counter = Counter(x)
for index,base in enumerate(bases):
ok = True
for y in map(str, bases[index:]):
if (counter[y] > 0):
ok = False
if (ok):
if (not str(base).isdigit()):
res = min(res, int(x, ord(base) - ord('A') + 10))
else:
res = min(res, int(x, int(base)))
print res
togatoga