結果

問題 No.138 化石のバージョン
ユーザー Tsukasa_TypeTsukasa_Type
提出日時 2018-02-09 18:31:58
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 581 bytes
コンパイル時間 2,075 ms
コンパイル使用メモリ 74,884 KB
実行使用メモリ 56,392 KB
最終ジャッジ日時 2024-04-16 19:47:24
合計ジャッジ時間 8,035 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
41,324 KB
testcase_01 AC 129 ms
41,444 KB
testcase_02 AC 127 ms
41,184 KB
testcase_03 AC 130 ms
41,552 KB
testcase_04 AC 116 ms
40,220 KB
testcase_05 AC 129 ms
41,144 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 132 ms
41,152 KB
testcase_17 AC 130 ms
41,028 KB
testcase_18 AC 131 ms
41,548 KB
testcase_19 AC 129 ms
41,532 KB
testcase_20 AC 131 ms
41,264 KB
testcase_21 AC 131 ms
41,644 KB
testcase_22 AC 131 ms
41,416 KB
testcase_23 AC 116 ms
39,876 KB
testcase_24 AC 130 ms
41,652 KB
testcase_25 AC 128 ms
41,192 KB
testcase_26 WA -
testcase_27 AC 129 ms
41,492 KB
testcase_28 AC 129 ms
41,120 KB
testcase_29 AC 130 ms
41,064 KB
testcase_30 AC 129 ms
41,244 KB
testcase_31 AC 129 ms
41,444 KB
testcase_32 AC 129 ms
41,436 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		String[] a = sc.nextLine().split("\\.");
		String[] b = sc.nextLine().split("\\.");
		int[] x = new int[3];
		int[] y = new int[3];
		for (int i=0; i<3; i++) {
			x[i] = Integer.parseInt(a[i]);
			y[i] = Integer.parseInt(b[i]);
		}
		
		boolean isOld = true;
		if (y[0] > x[0]) {isOld = false;}
		else {
			if (y[1] > x[1]) {isOld = false;}
			else {
				if (y[2] > x[2]) {isOld = false;}
			}
		}
		
		System.out.println(isOld==true?"YES":"NO");
	}
}
0