結果

問題 No.164 ちっちゃくないよ!!
ユーザー 👑 H20H20
提出日時 2021-03-06 12:01:17
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 63 ms / 2,000 ms
コード長 357 bytes
コンパイル時間 329 ms
コンパイル使用メモリ 82,124 KB
実行使用メモリ 70,240 KB
最終ジャッジ日時 2024-04-17 00:16:47
合計ジャッジ時間 1,378 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,548 KB
testcase_01 AC 35 ms
52,284 KB
testcase_02 AC 35 ms
52,532 KB
testcase_03 AC 36 ms
52,452 KB
testcase_04 AC 35 ms
52,744 KB
testcase_05 AC 63 ms
70,240 KB
testcase_06 AC 58 ms
69,504 KB
testcase_07 AC 55 ms
68,744 KB
testcase_08 AC 57 ms
70,076 KB
testcase_09 AC 55 ms
69,696 KB
testcase_10 AC 35 ms
52,768 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
ans = 10**20
for i in range(N):
    V = list(input())
    L = [0]*len(V)
    for j in range(len(L)):
        if '0' <= V[j] <= '9':
            L[j]=int(V[j])
        else:
            L[j]=ord(V[j])-65+10
    n = max(L)+1
    temp = 0
    L = L[::-1]
    for j in range(len(L)):
        temp+=L[j]*n**j
    ans = min(temp,ans)
print(ans)

0