結果

問題 No.164 ちっちゃくないよ!!
ユーザー ゆるく
提出日時 2015-05-03 05:14:04
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 598 bytes
コンパイル時間 108 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 12,160 KB
最終ジャッジ日時 2024-07-05 17:36:04
合計ジャッジ時間 1,172 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
#sys.setrecursionlimit(n)
import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

lm = lambda x: x - 55 if x >= 65 else x - 48
n = int(input())
e = [[int(lm(ord(i))) for i in list(input())] for i in range(n)]

num_base = 0
for ee in e:
    t = max(ee) + 1
    num_base = max(t, num_base)
ans = -1
for ee in e:
    t = 0
    num = 0    
    for ee2 in reversed(ee):
        t += pow(num_base, num) * ee2
        num += 1
    ans = min(ans, t) if ans >= 0 else t
print(ans)
0