結果

問題 No.138 化石のバージョン
ユーザー sasakkisasakki
提出日時 2016-03-13 13:28:21
言語 Java21
(openjdk 21)
結果
AC  
実行時間 117 ms / 5,000 ms
コード長 661 bytes
コンパイル時間 1,863 ms
コンパイル使用メモリ 71,272 KB
実行使用メモリ 57,856 KB
最終ジャッジ日時 2023-08-28 13:37:44
合計ジャッジ時間 7,326 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 115 ms
55,800 KB
testcase_01 AC 113 ms
55,812 KB
testcase_02 AC 114 ms
55,724 KB
testcase_03 AC 114 ms
55,684 KB
testcase_04 AC 113 ms
55,812 KB
testcase_05 AC 114 ms
56,124 KB
testcase_06 AC 113 ms
55,752 KB
testcase_07 AC 115 ms
56,008 KB
testcase_08 AC 115 ms
56,000 KB
testcase_09 AC 115 ms
55,960 KB
testcase_10 AC 113 ms
55,864 KB
testcase_11 AC 114 ms
55,352 KB
testcase_12 AC 114 ms
55,656 KB
testcase_13 AC 115 ms
55,696 KB
testcase_14 AC 115 ms
55,448 KB
testcase_15 AC 114 ms
56,096 KB
testcase_16 AC 115 ms
55,680 KB
testcase_17 AC 114 ms
55,892 KB
testcase_18 AC 116 ms
55,760 KB
testcase_19 AC 116 ms
55,924 KB
testcase_20 AC 114 ms
55,980 KB
testcase_21 AC 115 ms
55,964 KB
testcase_22 AC 113 ms
55,568 KB
testcase_23 AC 114 ms
55,608 KB
testcase_24 AC 117 ms
55,888 KB
testcase_25 AC 115 ms
56,356 KB
testcase_26 AC 114 ms
55,724 KB
testcase_27 AC 114 ms
56,268 KB
testcase_28 AC 113 ms
55,748 KB
testcase_29 AC 114 ms
56,328 KB
testcase_30 AC 114 ms
57,856 KB
testcase_31 AC 114 ms
55,656 KB
testcase_32 AC 115 ms
56,004 KB
testcase_33 AC 114 ms
55,872 KB
testcase_34 AC 114 ms
55,840 KB
testcase_35 AC 115 ms
55,864 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class main{
    public static void main(String args[]){
	
	Scanner scan = new Scanner(System.in);

	String str1 = scan.next();
	String str2 = scan.next();

	String ver1[] = str1.split("\\.", 0);
	String ver2[] = str2.split("\\.", 0);
	
        for(int i = 0; i < ver1.length; i++){
	    if(Integer.parseInt(ver1[i]) > Integer.parseInt(ver2[i])){
		System.out.println("YES");
		break;
	    }
	    else if(Integer.parseInt(ver1[i]) == Integer.parseInt(ver2[i])){
		if(i == ver1.length - 1){
		    System.out.println("YES");
		    break;
		}
		continue;
	    }
	    else{
		System.out.println("NO");
		break;
	    }

	}
	
	
    }
    
}
0