結果

問題 No.138 化石のバージョン
ユーザー omc-testomc-test
提出日時 2016-08-03 15:00:38
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 463 bytes
コンパイル時間 2,426 ms
コンパイル使用メモリ 74,972 KB
実行使用メモリ 41,424 KB
最終ジャッジ日時 2024-04-24 15:13:26
合計ジャッジ時間 8,139 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
41,148 KB
testcase_01 AC 126 ms
41,252 KB
testcase_02 WA -
testcase_03 AC 121 ms
41,104 KB
testcase_04 AC 113 ms
39,996 KB
testcase_05 AC 128 ms
40,884 KB
testcase_06 AC 113 ms
39,928 KB
testcase_07 AC 125 ms
41,028 KB
testcase_08 AC 114 ms
40,128 KB
testcase_09 AC 125 ms
41,016 KB
testcase_10 AC 124 ms
40,912 KB
testcase_11 AC 112 ms
39,848 KB
testcase_12 AC 110 ms
40,180 KB
testcase_13 AC 110 ms
40,392 KB
testcase_14 AC 113 ms
40,116 KB
testcase_15 AC 125 ms
41,224 KB
testcase_16 AC 123 ms
41,144 KB
testcase_17 AC 114 ms
40,256 KB
testcase_18 AC 110 ms
39,984 KB
testcase_19 AC 128 ms
41,272 KB
testcase_20 AC 127 ms
41,420 KB
testcase_21 AC 125 ms
40,852 KB
testcase_22 AC 127 ms
41,200 KB
testcase_23 AC 123 ms
41,208 KB
testcase_24 AC 128 ms
40,880 KB
testcase_25 AC 124 ms
40,944 KB
testcase_26 AC 128 ms
41,280 KB
testcase_27 AC 115 ms
39,900 KB
testcase_28 AC 111 ms
40,152 KB
testcase_29 AC 113 ms
39,984 KB
testcase_30 AC 125 ms
41,084 KB
testcase_31 AC 127 ms
41,104 KB
testcase_32 AC 125 ms
41,068 KB
testcase_33 AC 126 ms
41,328 KB
testcase_34 AC 124 ms
41,424 KB
testcase_35 AC 127 ms
40,908 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int kaseki = getVersion(sc.next());
		int judge = getVersion(sc.next());
		sc.close();
		System.out.println(kaseki >= judge ? "YES" : "NO");
	}

	public static int getVersion(String version){
		String[] s = version.split("\\.");
		int no = 0;
		for(int i=0; i<3; i++){
			no = no * 100 + Integer.valueOf(s[i]);
		}
		return no;
	}
}
0