結果

問題 No.164 ちっちゃくないよ!!
ユーザー mlihua09mlihua09
提出日時 2020-09-04 15:13:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 81 ms / 2,000 ms
コード長 293 bytes
コンパイル時間 298 ms
コンパイル使用メモリ 82,080 KB
実行使用メモリ 71,296 KB
最終ジャッジ日時 2024-05-04 10:30:30
合計ジャッジ時間 1,764 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
51,968 KB
testcase_01 AC 40 ms
51,584 KB
testcase_02 AC 39 ms
52,352 KB
testcase_03 AC 40 ms
51,840 KB
testcase_04 AC 40 ms
51,712 KB
testcase_05 AC 81 ms
71,296 KB
testcase_06 AC 74 ms
68,736 KB
testcase_07 AC 68 ms
66,304 KB
testcase_08 AC 73 ms
68,992 KB
testcase_09 AC 74 ms
68,864 KB
testcase_10 AC 42 ms
52,224 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


ans = 36 ** 12 + 1

for _ in range(int(input())):
    S = [ord(i) - ord('0') if ord(i) < ord('A') else ord(i) - ord('A') + 10 for i in input()]
    p = max(S) + 1
    
    S.reverse()
    x = 0
    y = 1
    for s in S:
        x += s * y
        y *= p
    ans = min(ans, x)
    
print(ans)
0