結果

問題 No.138 化石のバージョン
ユーザー omc-testomc-test
提出日時 2016-08-03 15:01:20
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 5,000 ms
コード長 463 bytes
コンパイル時間 2,013 ms
コンパイル使用メモリ 72,072 KB
実行使用メモリ 55,928 KB
最終ジャッジ日時 2023-08-28 13:43:44
合計ジャッジ時間 7,835 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,464 KB
testcase_01 AC 118 ms
55,928 KB
testcase_02 AC 119 ms
55,584 KB
testcase_03 AC 118 ms
55,520 KB
testcase_04 AC 118 ms
55,504 KB
testcase_05 AC 119 ms
55,488 KB
testcase_06 AC 119 ms
55,496 KB
testcase_07 AC 119 ms
55,660 KB
testcase_08 AC 119 ms
53,692 KB
testcase_09 AC 119 ms
55,716 KB
testcase_10 AC 119 ms
55,488 KB
testcase_11 AC 120 ms
55,680 KB
testcase_12 AC 120 ms
55,808 KB
testcase_13 AC 123 ms
55,488 KB
testcase_14 AC 119 ms
55,772 KB
testcase_15 AC 120 ms
55,728 KB
testcase_16 AC 118 ms
55,728 KB
testcase_17 AC 118 ms
55,776 KB
testcase_18 AC 119 ms
55,592 KB
testcase_19 AC 117 ms
55,676 KB
testcase_20 AC 120 ms
55,296 KB
testcase_21 AC 120 ms
55,444 KB
testcase_22 AC 117 ms
53,704 KB
testcase_23 AC 121 ms
55,504 KB
testcase_24 AC 123 ms
55,644 KB
testcase_25 AC 120 ms
55,644 KB
testcase_26 AC 119 ms
55,560 KB
testcase_27 AC 120 ms
55,604 KB
testcase_28 AC 121 ms
55,624 KB
testcase_29 AC 121 ms
55,492 KB
testcase_30 AC 124 ms
55,336 KB
testcase_31 AC 126 ms
55,468 KB
testcase_32 AC 122 ms
55,620 KB
testcase_33 AC 122 ms
55,764 KB
testcase_34 AC 120 ms
55,784 KB
testcase_35 AC 122 ms
55,692 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 * 101 + Integer.valueOf(s[i]);
		}
		return no;
	}
}
0