結果

問題 No.164 ちっちゃくないよ!!
ユーザー ゆるくゆるく
提出日時 2015-05-03 05:14:04
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 598 bytes
コンパイル時間 618 ms
コンパイル使用メモリ 10,936 KB
実行使用メモリ 10,560 KB
最終ジャッジ日時 2023-09-19 05:10:44
合計ジャッジ時間 2,432 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
10,268 KB
testcase_01 AC 33 ms
10,272 KB
testcase_02 WA -
testcase_03 AC 34 ms
10,312 KB
testcase_04 AC 33 ms
10,364 KB
testcase_05 AC 44 ms
10,516 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
権限があれば一括ダウンロードができます

ソースコード

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