結果
| 問題 |
No.164 ちっちゃくないよ!!
|
| コンテスト | |
| ユーザー |
yaoshimax
|
| 提出日時 | 2015-03-25 00:59:32 |
| 言語 | Python2 (2.7.18) |
| 結果 |
AC
|
| 実行時間 | 57 ms / 2,000 ms |
| コード長 | 508 bytes |
| コンパイル時間 | 44 ms |
| コンパイル使用メモリ | 7,040 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2024-10-13 14:13:08 |
| 合計ジャッジ時間 | 796 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
ソースコード
N=int(raw_input())
def getNum(c):
if ord(c) >= ord('0') and ord(c) <= ord('9'):
return ord(c)-ord('0')
return ord(c)-ord('A')+10
ans = 1e19
for i in range(N):
s=raw_input()
for b in range(2,37):
tmp=0
digit=1
ok = True
for c in s[::-1]:
n=getNum(c)
if n >= b:
ok=False
break
tmp+=digit*n
digit*=b
if ok:
ans=min(ans,tmp)
break
print ans
yaoshimax