結果

問題 No.164 ちっちゃくないよ!!
ユーザー JunOnumaJunOnuma
提出日時 2017-06-06 18:57:36
言語 Python2
(2.7.18)
結果
AC  
実行時間 20 ms / 2,000 ms
コード長 371 bytes
コンパイル時間 432 ms
コンパイル使用メモリ 7,120 KB
実行使用メモリ 6,700 KB
最終ジャッジ日時 2023-10-23 17:59:04
合計ジャッジ時間 1,145 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
6,460 KB
testcase_01 AC 11 ms
6,460 KB
testcase_02 AC 11 ms
6,460 KB
testcase_03 AC 10 ms
6,460 KB
testcase_04 AC 11 ms
6,460 KB
testcase_05 AC 20 ms
6,700 KB
testcase_06 AC 20 ms
6,696 KB
testcase_07 AC 14 ms
6,536 KB
testcase_08 AC 18 ms
6,644 KB
testcase_09 AC 17 ms
6,644 KB
testcase_10 AC 12 ms
6,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(raw_input())
ll = [list(raw_input()) for _ in range(n)]
mn = 36**13
for l in ll:
    m = []
    for c in l:
        if c >= 'A':
            m.append(ord(c)-ord('A')+10)
        else:
            m.append(ord(c)-ord('0'))
    base = max(m)+1
    m.reverse()
    s = 0
    mul = 1
    for i in m:
        s += i*mul
        mul *= base
    mn = min(mn,s)
print mn
0