結果

問題 No.164 ちっちゃくないよ!!
ユーザー kichirb3kichirb3
提出日時 2018-03-22 17:27:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 71 ms / 2,000 ms
コード長 616 bytes
コンパイル時間 269 ms
コンパイル使用メモリ 10,780 KB
実行使用メモリ 7,964 KB
最終ジャッジ日時 2023-09-07 01:31:40
合計ジャッジ時間 1,378 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,832 KB
testcase_01 AC 16 ms
7,884 KB
testcase_02 AC 16 ms
7,796 KB
testcase_03 AC 16 ms
7,868 KB
testcase_04 AC 15 ms
7,964 KB
testcase_05 AC 71 ms
7,872 KB
testcase_06 AC 55 ms
7,792 KB
testcase_07 AC 33 ms
7,928 KB
testcase_08 AC 54 ms
7,788 KB
testcase_09 AC 53 ms
7,964 KB
testcase_10 AC 18 ms
7,804 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding: utf-8 -*-
"""
No.164 ちっちゃくないよ!!
https://yukicoder.me/problems/no/164

"""
import sys
from sys import stdin
input = stdin.readline


def solve(V):
    ans = float('inf')
    for v in V:
        v = v.lstrip('0')
        for x in range(2, 36+1):
            try:
                t = int(v, x)
                ans = min(ans, t)
                break
            except ValueError:
                pass
    return ans


def main(args):
    N = int(input())
    V = [input().strip() for _ in range(N)]
    ans = solve(V)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])
0