結果
| 問題 |
No.164 ちっちゃくないよ!!
|
| コンテスト | |
| ユーザー |
ki_ki33
|
| 提出日時 | 2015-03-12 23:50:51 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 172 ms / 2,000 ms |
| コード長 | 1,220 bytes |
| コンパイル時間 | 2,018 ms |
| コンパイル使用メモリ | 81,088 KB |
| 実行使用メモリ | 55,128 KB |
| 最終ジャッジ日時 | 2024-10-13 14:08:10 |
| 合計ジャッジ時間 | 4,121 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
ソースコード
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);
}
}
ki_ki33