結果

問題 No.164 ちっちゃくないよ!!
ユーザー ki_ki33ki_ki33
提出日時 2015-03-12 23:50:51
言語 Java21
(openjdk 21)
結果
AC  
実行時間 171 ms / 2,000 ms
コード長 1,220 bytes
コンパイル時間 1,894 ms
コンパイル使用メモリ 81,148 KB
実行使用メモリ 42,572 KB
最終ジャッジ日時 2024-04-21 15:18:42
合計ジャッジ時間 3,980 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 98 ms
41,636 KB
testcase_01 AC 104 ms
41,288 KB
testcase_02 AC 114 ms
41,320 KB
testcase_03 AC 117 ms
41,568 KB
testcase_04 AC 110 ms
41,728 KB
testcase_05 AC 167 ms
42,452 KB
testcase_06 AC 171 ms
42,572 KB
testcase_07 AC 149 ms
42,572 KB
testcase_08 AC 159 ms
42,440 KB
testcase_09 AC 163 ms
42,472 KB
testcase_10 AC 113 ms
41,452 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedInputStream;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.*;
import java.util.Map.Entry;
import java.util.concurrent.ConcurrentSkipListSet;

public class Main {
	public static final int C =  1000000007;
	static final int CY = 1000000000;
	//static boolean MAP[][];
	static int N;
	static int M;
	static int[][] DIF;
	static String S;
	static int K;
	static int X[][];
	//static String S[];
	static int HA[];

	static long DP[];
	static int ST[][];
	static ConcurrentSkipListSet<Integer> TS;
	static ArrayList<Integer> AL;
	public static void main(String[] args) {
		StringBuilder sb = new StringBuilder();
		BufferedInputStream bs = new BufferedInputStream(System.in);
		Scanner sc = new Scanner(bs);

		N = sc.nextInt();


		BigInteger ans = new BigInteger("ZZZZZZZZZZZZ", 36);

		String[] strs = new String[N];
		for (int i=0; i < N; i++) {

			String str = sc.next();
			strs[i] = str;
			int d = 1;
			for (int t=0; t < str.length(); t++) {
				d = Math.max(d,  str.charAt(t) - '0' +1);
			}
			if (d > 10) {
				d-=7;
			}
			BigInteger num = new BigInteger(strs[i], d);
			ans = ans.min(num);
		}




		System.out.println(ans);
	}
}
0