結果

問題 No.164 ちっちゃくないよ!!
ユーザー zombietanzombietan
提出日時 2016-05-29 06:42:34
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 26 ms / 2,000 ms
コード長 355 bytes
コンパイル時間 364 ms
コンパイル使用メモリ 10,596 KB
実行使用メモリ 8,364 KB
最終ジャッジ日時 2023-08-04 16:21:35
合計ジャッジ時間 1,167 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
7,784 KB
testcase_01 AC 13 ms
7,936 KB
testcase_02 AC 14 ms
7,832 KB
testcase_03 AC 13 ms
7,860 KB
testcase_04 AC 13 ms
7,884 KB
testcase_05 AC 26 ms
8,364 KB
testcase_06 AC 26 ms
7,852 KB
testcase_07 AC 19 ms
7,892 KB
testcase_08 AC 22 ms
7,868 KB
testcase_09 AC 23 ms
7,832 KB
testcase_10 AC 15 ms
7,860 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
V = [input() for _ in range(N)]
S = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"

ans = []
for num in V:
    num = num.lstrip('0')
    d = []
    for n in num:
        d.append(S.index(n))
    m = max(d) + 1
    total = 0
    for i, v in enumerate(num, 1):
        total += S.index(v) * pow(m, len(num)-i)
    ans.append(total)

print(min(ans))
0