結果

問題 No.164 ちっちゃくないよ!!
ユーザー ゆるく
提出日時 2015-05-04 04:19:09
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 39 ms / 2,000 ms
コード長 333 bytes
コンパイル時間 223 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-10-13 14:14:25
合計ジャッジ時間 1,076 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

lm = lambda x: x - 55 if x >= 65 else x - 48
n = int(input())
e = [[int(lm(ord(i))) for i in list(input())] for i in range(n)]

ans = -1
for ee in e:
    num_base = max(ee) + 1
    t = 0
    num = 0
    for ee2 in reversed(ee):
        t += (num_base ** num) * ee2
        num += 1
    ans = min(ans, t) if ans >= 0 else t
print(ans)
0