結果

問題 No.164 ちっちゃくないよ!!
ユーザー 👑 KazunKazun
提出日時 2021-01-05 00:26:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 64 ms / 2,000 ms
コード長 328 bytes
コンパイル時間 146 ms
コンパイル使用メモリ 82,436 KB
実行使用メモリ 73,088 KB
最終ジャッジ日時 2024-04-23 09:12:01
合計ジャッジ時間 1,479 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
63,772 KB
testcase_01 AC 50 ms
63,744 KB
testcase_02 AC 49 ms
63,488 KB
testcase_03 AC 51 ms
63,360 KB
testcase_04 AC 51 ms
63,744 KB
testcase_05 AC 57 ms
72,448 KB
testcase_06 AC 64 ms
73,088 KB
testcase_07 AC 58 ms
69,248 KB
testcase_08 AC 63 ms
72,192 KB
testcase_09 AC 59 ms
72,192 KB
testcase_10 AC 52 ms
64,128 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def decode(S):
    d=max([X.index(s) for s in S])+1

    b=1
    A=0
    for s in S[::-1]:
        A+=b*X.index(s)
        b*=d
    return A

import sys
from string import ascii_uppercase as X

input=sys.stdin.readline
X="0123456789"+X

N=int(input())
M=float("inf")
for _ in range(N):
    M=min(M,decode(input()[:-1]))
print(M)
0