結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 100 ms
52,956 KB
testcase_01 AC 109 ms
54,124 KB
testcase_02 AC 109 ms
54,176 KB
testcase_03 AC 111 ms
54,192 KB
testcase_04 AC 112 ms
52,840 KB
testcase_05 AC 112 ms
53,744 KB
testcase_06 WA -
testcase_07 AC 112 ms
54,112 KB
testcase_08 AC 101 ms
53,004 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 101 ms
52,976 KB
testcase_20 AC 113 ms
54,052 KB
testcase_21 WA -
testcase_22 AC 110 ms
54,036 KB
testcase_23 AC 102 ms
52,720 KB
testcase_24 AC 113 ms
54,268 KB
testcase_25 AC 110 ms
54,176 KB
testcase_26 AC 102 ms
53,948 KB
testcase_27 AC 110 ms
53,984 KB
testcase_28 AC 111 ms
54,136 KB
testcase_29 AC 98 ms
52,904 KB
testcase_30 AC 98 ms
54,084 KB
testcase_31 AC 104 ms
52,948 KB
testcase_32 AC 96 ms
52,952 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