結果

問題 No.138 化石のバージョン
ユーザー sasakkisasakki
提出日時 2016-03-13 13:26:07
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 583 bytes
コンパイル時間 4,115 ms
コンパイル使用メモリ 74,204 KB
実行使用メモリ 57,576 KB
最終ジャッジ日時 2023-10-26 03:18:30
合計ジャッジ時間 10,331 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
57,216 KB
testcase_01 AC 134 ms
57,192 KB
testcase_02 AC 132 ms
57,472 KB
testcase_03 AC 132 ms
57,408 KB
testcase_04 AC 134 ms
57,212 KB
testcase_05 AC 132 ms
57,460 KB
testcase_06 AC 130 ms
57,180 KB
testcase_07 AC 131 ms
57,488 KB
testcase_08 AC 140 ms
57,212 KB
testcase_09 AC 132 ms
57,576 KB
testcase_10 AC 135 ms
57,228 KB
testcase_11 AC 138 ms
57,252 KB
testcase_12 AC 133 ms
57,180 KB
testcase_13 AC 140 ms
55,432 KB
testcase_14 AC 135 ms
57,160 KB
testcase_15 AC 133 ms
57,176 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 131 ms
57,488 KB
testcase_20 AC 136 ms
57,148 KB
testcase_21 WA -
testcase_22 AC 130 ms
57,240 KB
testcase_23 AC 129 ms
57,404 KB
testcase_24 AC 132 ms
57,572 KB
testcase_25 AC 130 ms
57,420 KB
testcase_26 AC 135 ms
57,228 KB
testcase_27 AC 134 ms
57,160 KB
testcase_28 AC 133 ms
57,452 KB
testcase_29 AC 134 ms
57,432 KB
testcase_30 AC 131 ms
57,224 KB
testcase_31 AC 134 ms
57,208 KB
testcase_32 AC 132 ms
57,244 KB
testcase_33 AC 137 ms
57,456 KB
testcase_34 AC 137 ms
57,260 KB
testcase_35 AC 132 ms
57,224 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])){
		continue;
	    }
	    else{
		System.out.println("NO");
		break;
	    }

	}
	
	
    }
    
}
0