結果

問題 No.164 ちっちゃくないよ!!
ユーザー mlihua09mlihua09
提出日時 2020-09-04 15:13:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 109 ms / 2,000 ms
コード長 293 bytes
コンパイル時間 1,519 ms
コンパイル使用メモリ 86,600 KB
実行使用メモリ 77,056 KB
最終ジャッジ日時 2023-08-17 03:17:14
合計ジャッジ時間 2,352 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,380 KB
testcase_01 AC 75 ms
71,156 KB
testcase_02 AC 75 ms
71,180 KB
testcase_03 AC 77 ms
71,236 KB
testcase_04 AC 76 ms
71,320 KB
testcase_05 AC 109 ms
77,056 KB
testcase_06 AC 101 ms
76,844 KB
testcase_07 AC 96 ms
76,744 KB
testcase_08 AC 100 ms
76,832 KB
testcase_09 AC 99 ms
76,724 KB
testcase_10 AC 77 ms
71,308 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