結果

問題 No.164 ちっちゃくないよ!!
ユーザー TawaraTawara
提出日時 2015-08-28 22:17:13
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 278 bytes
コンパイル時間 917 ms
コンパイル使用メモリ 6,776 KB
実行使用メモリ 6,240 KB
最終ジャッジ日時 2023-09-25 19:08:30
合計ジャッジ時間 1,183 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
5,976 KB
testcase_01 AC 13 ms
6,240 KB
testcase_02 AC 12 ms
5,960 KB
testcase_03 AC 11 ms
6,108 KB
testcase_04 AC 14 ms
5,972 KB
testcase_05 WA -
testcase_06 AC 93 ms
5,992 KB
testcase_07 AC 46 ms
5,972 KB
testcase_08 AC 73 ms
6,060 KB
testcase_09 AC 72 ms
6,016 KB
testcase_10 AC 14 ms
6,068 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def s2m(s):
	ans = 35**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