結果
問題 | No.164 ちっちゃくないよ!! |
ユーザー |
![]() |
提出日時 | 2015-04-19 20:51:49 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 175 ms / 2,000 ms |
コード長 | 828 bytes |
コンパイル時間 | 2,526 ms |
コンパイル使用メモリ | 75,648 KB |
実行使用メモリ | 54,532 KB |
最終ジャッジ日時 | 2024-10-13 14:14:17 |
合計ジャッジ時間 | 3,915 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
ソースコード
import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner koko = new Scanner(System.in); int n = koko.nextInt(); String[] moto = new String[n]; long[] chicchai = new long[n]; for(int i=0; i<n; i++){ moto[i] = koko.next(); chicchai[i] = parse(moto[i], 'Z', 36); } Arrays.sort(chicchai); System.out.println(chicchai[0]); } static long parse(String moto, char sinsu, int sin){ String s = String.valueOf(sinsu); if(moto.indexOf(s)!=-1){ long a = Long.parseLong(moto, sin); return a; }else if(sinsu=='A'){ return parse(moto, '9', 10); }else{ return parse(moto, (char)(sinsu-1), sin-1); } } }