結果

問題 No.164 ちっちゃくないよ!!
ユーザー syunsukesyunsuke
提出日時 2020-09-19 14:09:08
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 526 bytes
コンパイル時間 996 ms
コンパイル使用メモリ 86,856 KB
実行使用メモリ 76,988 KB
最終ジャッジ日時 2023-09-05 18:39:50
合計ジャッジ時間 2,270 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,188 KB
testcase_01 AC 77 ms
71,172 KB
testcase_02 WA -
testcase_03 AC 72 ms
71,244 KB
testcase_04 AC 71 ms
71,136 KB
testcase_05 AC 92 ms
76,964 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())

Al=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
Dic={}
for i in range(36):
    Dic[Al[i]]=i
#print(Dic)

F="0000000000000"

Dim=0
L=[]
for i in range(N):
    s=input()
    s=F+s
    s=s[-12:]
    for j in range(len(s)):
        Dim=max(Dim,Dic[s[j]])
    L.append(s)
#print(Dim)

ans=10**30
for i in L:
    cnt=0
    for j in range(12):
        cnt+=Dic[i[j]]*((Dim+1)**(11-j))
    ans=min(ans,cnt)
print(ans)
0