結果

問題 No.164 ちっちゃくないよ!!
ユーザー rlangevinrlangevin
提出日時 2023-01-08 21:53:53
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 360 bytes
コンパイル時間 363 ms
コンパイル使用メモリ 87,296 KB
実行使用メモリ 78,472 KB
最終ジャッジ日時 2023-08-22 06:38:30
合計ジャッジ時間 2,353 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,028 KB
testcase_01 AC 69 ms
71,320 KB
testcase_02 AC 67 ms
71,456 KB
testcase_03 AC 71 ms
71,260 KB
testcase_04 AC 68 ms
71,208 KB
testcase_05 WA -
testcase_06 AC 105 ms
77,024 KB
testcase_07 AC 89 ms
76,876 KB
testcase_08 AC 94 ms
76,936 KB
testcase_09 AC 96 ms
76,960 KB
testcase_10 AC 69 ms
71,104 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def f(x):
    if 0 <= ord(x) - ord("0") <= 9:
        return ord(x) - ord("0")
    return ord(x) - ord("A") + 10

N = int(input())
ans = 10 ** 18
for _ in range(N):
    V = list(input())
    V = list(map(f, V))
    maxv = max(V) + 1
    V.reverse()
    c = 1
    val = 0
    for v in V:
        val += c * v
        c *= maxv
    ans = min(ans, val)
print(ans)
0