結果

問題 No.164 ちっちゃくないよ!!
ユーザー nbisconbisco
提出日時 2017-02-04 15:18:50
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 451 bytes
コンパイル時間 235 ms
コンパイル使用メモリ 10,960 KB
実行使用メモリ 8,000 KB
最終ジャッジ日時 2023-08-25 20:11:31
合計ジャッジ時間 1,106 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,864 KB
testcase_01 AC 15 ms
7,840 KB
testcase_02 RE -
testcase_03 AC 16 ms
7,860 KB
testcase_04 AC 16 ms
7,872 KB
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

def convert(s, base):
    global dic
    ans = 0
    for i in s:
        ans *= base
        ans += dic[i]
    return ans

N = int(input())
nums = [input() for i in range(N)]

dic = {chr(ord("0")+i):i for i in range(10)}
for i in range(ord("Z")-ord("A")):
    dic[chr(ord("A")+i)] = i + 10
ans = 36**13
for i in nums:
    largest_char = sorted(i, reverse=True)[0]
    base = dic[largest_char] + 1
    ans = min(ans, convert(list(i), base))
print(ans)
0