結果

問題 No.164 ちっちゃくないよ!!
ユーザー kou6839
提出日時 2015-03-13 00:31:01
言語 Java
(openjdk 23)
結果
AC  
実行時間 167 ms / 2,000 ms
コード長 596 bytes
コンパイル時間 1,877 ms
コンパイル使用メモリ 74,296 KB
実行使用メモリ 41,736 KB
最終ジャッジ日時 2024-10-13 14:11:13
合計ジャッジ時間 3,995 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.beans.IntrospectionException;
import java.util.*;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long ans = Long.MAX_VALUE;
		for(int i=0;i<n;i++){
			long temp=0;
			String string = sc.next();
			int max=49;
			for(int j=0;j<string.length();j++){
				max=Math.max(max,(int)string.charAt(j));
			}
			if(max<60){
				max=max-48+1;
			}else{
				max=max-55+1;
			}
			for(int j=0;j<string.length();j++){
				temp=Long.parseLong(string, max);
			}
			ans=Math.min(ans, temp);
		}
		System.out.println(ans);
	}
}
0