結果

問題 No.164 ちっちゃくないよ!!
ユーザー ぴろずぴろず
提出日時 2015-03-12 23:27:19
言語 Java21
(openjdk 21)
結果
AC  
実行時間 300 ms / 2,000 ms
コード長 534 bytes
コンパイル時間 2,824 ms
コンパイル使用メモリ 74,504 KB
実行使用メモリ 49,036 KB
最終ジャッジ日時 2024-04-21 15:10:42
合計ジャッジ時間 4,564 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
41,792 KB
testcase_01 AC 122 ms
41,784 KB
testcase_02 AC 114 ms
41,436 KB
testcase_03 AC 112 ms
41,376 KB
testcase_04 AC 120 ms
41,560 KB
testcase_05 AC 300 ms
49,012 KB
testcase_06 AC 282 ms
48,644 KB
testcase_07 AC 226 ms
48,632 KB
testcase_08 AC 283 ms
48,248 KB
testcase_09 AC 277 ms
49,036 KB
testcase_10 AC 139 ms
43,756 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package no164;

import java.math.BigInteger;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		BigInteger min = null;
		for(int i=0;i<n;i++) {
			String s = sc.next();
			for(int radix=2;radix<=36;radix++) {
				try {
					BigInteger val = new BigInteger(s, radix);
					if (min == null) {
						min = val;
					}else{
						min = min.min(val);
					}
				} catch (Exception e) {
				}

			}
		}
		System.out.println(min);
	}

}
0