結果

問題 No.138 化石のバージョン
ユーザー YatsukuYatsuku
提出日時 2015-12-13 01:37:39
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 556 bytes
コンパイル時間 1,972 ms
コンパイル使用メモリ 71,192 KB
実行使用メモリ 57,932 KB
最終ジャッジ日時 2023-10-13 14:12:15
合計ジャッジ時間 7,740 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
56,000 KB
testcase_01 AC 118 ms
53,472 KB
testcase_02 AC 118 ms
55,476 KB
testcase_03 AC 118 ms
55,784 KB
testcase_04 AC 119 ms
56,164 KB
testcase_05 AC 119 ms
56,008 KB
testcase_06 AC 121 ms
55,716 KB
testcase_07 AC 119 ms
55,772 KB
testcase_08 AC 119 ms
55,572 KB
testcase_09 AC 120 ms
55,432 KB
testcase_10 AC 120 ms
55,528 KB
testcase_11 AC 118 ms
54,112 KB
testcase_12 AC 118 ms
55,448 KB
testcase_13 AC 118 ms
55,748 KB
testcase_14 AC 119 ms
55,772 KB
testcase_15 AC 119 ms
55,604 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 120 ms
53,732 KB
testcase_20 AC 119 ms
56,044 KB
testcase_21 WA -
testcase_22 AC 120 ms
55,932 KB
testcase_23 AC 121 ms
55,488 KB
testcase_24 AC 121 ms
55,648 KB
testcase_25 AC 119 ms
55,584 KB
testcase_26 AC 119 ms
56,180 KB
testcase_27 AC 120 ms
56,212 KB
testcase_28 AC 118 ms
55,420 KB
testcase_29 AC 119 ms
55,712 KB
testcase_30 AC 116 ms
55,232 KB
testcase_31 AC 119 ms
55,744 KB
testcase_32 AC 119 ms
55,836 KB
testcase_33 AC 120 ms
55,200 KB
testcase_34 AC 120 ms
55,480 KB
testcase_35 AC 120 ms
55,832 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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

		String[] old_ver = stdIn.next().split("\\.");
		String[] ver = stdIn.next().split("\\.");
		
		boolean flag = true;
		for (int i = 0; i < 3; i++) {
			if (Integer.parseInt(old_ver[i]) > Integer.parseInt(ver[i])) {
				if ( flag ) {
					System.out.println("YES");	
					System.exit(0);
				}
			} else if (Integer.parseInt(old_ver[i]) != Integer.parseInt(ver[i])){
				flag = false;
			}
		}
		System.out.println("NO");
	}
}
0