結果
| 問題 | No.164 ちっちゃくないよ!! |
| コンテスト | |
| ユーザー |
yaoshimax
|
| 提出日時 | 2015-03-25 00:59:32 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 101 ms / 2,000 ms |
| コード長 | 508 bytes |
| コンパイル時間 | 129 ms |
| コンパイル使用メモリ | 77,720 KB |
| 最終ジャッジ日時 | 2025-12-03 14:29:48 |
|
ジャッジサーバーID (参考情報) |
judge5 / 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