結果

問題 No.164 ちっちゃくないよ!!
ユーザー togatogatogatoga
提出日時 2015-09-10 19:29:20
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 676 bytes
コンパイル時間 73 ms
コンパイル使用メモリ 6,568 KB
実行使用メモリ 6,532 KB
最終ジャッジ日時 2023-09-26 10:26:40
合計ジャッジ時間 2,239 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
6,324 KB
testcase_01 AC 17 ms
6,516 KB
testcase_02 AC 16 ms
6,336 KB
testcase_03 AC 15 ms
6,456 KB
testcase_04 AC 19 ms
6,400 KB
testcase_05 WA -
testcase_06 AC 297 ms
6,480 KB
testcase_07 AC 137 ms
6,428 KB
testcase_08 AC 299 ms
6,532 KB
testcase_09 AC 302 ms
6,388 KB
testcase_10 AC 27 ms
6,316 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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