結果

問題 No.138 化石のバージョン
ユーザー TwinkleStar74TwinkleStar74
提出日時 2017-10-02 02:48:03
言語 Java21
(openjdk 21)
結果
AC  
実行時間 43 ms / 5,000 ms
コード長 993 bytes
コンパイル時間 3,087 ms
コンパイル使用メモリ 74,060 KB
実行使用メモリ 49,728 KB
最終ジャッジ日時 2023-08-28 13:55:16
合計ジャッジ時間 6,063 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
49,184 KB
testcase_01 AC 41 ms
49,260 KB
testcase_02 AC 41 ms
49,224 KB
testcase_03 AC 42 ms
49,132 KB
testcase_04 AC 42 ms
49,240 KB
testcase_05 AC 42 ms
49,228 KB
testcase_06 AC 41 ms
49,128 KB
testcase_07 AC 42 ms
49,140 KB
testcase_08 AC 41 ms
49,456 KB
testcase_09 AC 41 ms
49,256 KB
testcase_10 AC 41 ms
49,164 KB
testcase_11 AC 41 ms
49,132 KB
testcase_12 AC 41 ms
48,992 KB
testcase_13 AC 42 ms
49,136 KB
testcase_14 AC 42 ms
49,228 KB
testcase_15 AC 42 ms
49,328 KB
testcase_16 AC 42 ms
49,308 KB
testcase_17 AC 43 ms
49,384 KB
testcase_18 AC 43 ms
49,344 KB
testcase_19 AC 43 ms
49,324 KB
testcase_20 AC 42 ms
49,228 KB
testcase_21 AC 43 ms
49,340 KB
testcase_22 AC 43 ms
49,260 KB
testcase_23 AC 43 ms
49,448 KB
testcase_24 AC 43 ms
49,544 KB
testcase_25 AC 43 ms
49,116 KB
testcase_26 AC 42 ms
49,220 KB
testcase_27 AC 42 ms
49,372 KB
testcase_28 AC 41 ms
49,388 KB
testcase_29 AC 42 ms
49,132 KB
testcase_30 AC 41 ms
49,220 KB
testcase_31 AC 41 ms
49,728 KB
testcase_32 AC 41 ms
49,224 KB
testcase_33 AC 43 ms
49,448 KB
testcase_34 AC 41 ms
49,352 KB
testcase_35 AC 42 ms
49,388 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class No138 {
	public static void main(String[] args) {
		try{
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			String[] str1 = br.readLine().split("\\.");
			int[] ver1 = new int[3];
			dainyu(ver1, str1);
			
			String[] str2 = br.readLine().split("\\.");
			int[] ver2 = new int[3];
			dainyu(ver2, str2);
			
			Hantei(ver1[0], ver2[0]);
			Hantei(ver1[1], ver2[1]);
			Hantei(ver1[2], ver2[2]);
			System.out.println("YES");
			
		}catch(IOException e){
			e.getStackTrace();
		}catch(NumberFormatException e){
		    e.getStackTrace();
		}
	}
	
	
	public static void dainyu(int[] x, String[] y){
		for(int i=0; i < y.length; i++)
			x[i] = Integer.parseInt(y[i]);
	}
	
	public static void Hantei(int a, int b){
		if(a>b){
			System.out.println("YES");
			System.exit(0);
		}
		else if(a<b){
			System.out.println("NO");
			System.exit(0);
		}
		else ;
	}
}
0