結果

問題 No.164 ちっちゃくないよ!!
コンテスト
ユーザー togatoga
提出日時 2015-09-10 19:29:20
言語 PyPy2
(7.3.15)
結果
WA  
実行時間 -
コード長 676 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 127 ms
コンパイル使用メモリ 78,140 KB
最終ジャッジ日時 2025-12-03 16:53:18
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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') + 1):
    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)))
        
res = min(res, int(x, 36))
print res
0