結果

問題 No.164 ちっちゃくないよ!!
ユーザー TawaraTawara
提出日時 2015-08-28 22:25:34
言語 Python2
(2.7.18)
結果
AC  
実行時間 95 ms / 2,000 ms
コード長 278 bytes
コンパイル時間 214 ms
コンパイル使用メモリ 6,576 KB
実行使用メモリ 6,204 KB
最終ジャッジ日時 2023-08-03 17:13:15
合計ジャッジ時間 1,542 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
6,204 KB
testcase_01 AC 13 ms
6,056 KB
testcase_02 AC 12 ms
6,176 KB
testcase_03 AC 11 ms
6,084 KB
testcase_04 AC 15 ms
5,968 KB
testcase_05 AC 31 ms
6,068 KB
testcase_06 AC 95 ms
6,128 KB
testcase_07 AC 47 ms
5,960 KB
testcase_08 AC 72 ms
6,016 KB
testcase_09 AC 72 ms
6,040 KB
testcase_10 AC 15 ms
6,056 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def s2m(s):
	ans = 36**12
	for n in range(2,37):
		tmp = 0
		for i,c in enumerate(s):
			z = int(c) if c.isdigit() else (ord(c)-55)
			if z >= n:
				break
			tmp += z*n**i
		else:
			ans = min(ans,tmp)
	return ans
N = input()
print min(s2m(raw_input()[::-1]) for i in range(N))
0