結果

問題 No.138 化石のバージョン
ユーザー marumaru
提出日時 2016-03-23 12:04:24
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 751 bytes
コンパイル時間 3,607 ms
コンパイル使用メモリ 75,348 KB
実行使用メモリ 54,368 KB
最終ジャッジ日時 2024-04-09 19:18:50
合計ジャッジ時間 8,212 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 99 ms
52,812 KB
testcase_01 AC 111 ms
54,196 KB
testcase_02 AC 103 ms
53,152 KB
testcase_03 AC 107 ms
53,596 KB
testcase_04 AC 107 ms
52,824 KB
testcase_05 AC 116 ms
54,132 KB
testcase_06 WA -
testcase_07 AC 107 ms
53,624 KB
testcase_08 AC 107 ms
54,024 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 110 ms
54,112 KB
testcase_20 AC 115 ms
54,260 KB
testcase_21 WA -
testcase_22 AC 105 ms
53,300 KB
testcase_23 AC 93 ms
52,600 KB
testcase_24 AC 102 ms
53,016 KB
testcase_25 AC 112 ms
53,836 KB
testcase_26 AC 112 ms
54,008 KB
testcase_27 AC 102 ms
53,144 KB
testcase_28 AC 116 ms
54,008 KB
testcase_29 AC 118 ms
54,176 KB
testcase_30 AC 112 ms
53,892 KB
testcase_31 AC 101 ms
52,980 KB
testcase_32 AC 100 ms
52,872 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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

		String[] a_str = a.split("\\.");
		String[] b_str = b.split("\\.");
		
		if (a_str[0].compareTo(b_str[0]) == 1) {
			System.out.println("YES");
		} else if (a_str[0].compareTo(b_str[0]) == 0) {
			if (a_str[1].compareTo(b_str[1]) == 1) {
				System.out.println("YES");
			} else if (a_str[1].compareTo(b_str[1]) == 0) {
				if (a_str[2].compareTo(b_str[2]) == 1) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} else {
				System.out.println("NO");
			}
		} else {
			System.out.println("NO");
		}
	}
}
0