結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
53,988 KB
testcase_01 AC 111 ms
53,920 KB
testcase_02 AC 108 ms
53,788 KB
testcase_03 AC 107 ms
54,100 KB
testcase_04 AC 109 ms
53,888 KB
testcase_05 AC 106 ms
53,752 KB
testcase_06 WA -
testcase_07 AC 101 ms
53,148 KB
testcase_08 AC 112 ms
54,044 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,060 KB
testcase_20 AC 100 ms
53,048 KB
testcase_21 WA -
testcase_22 AC 104 ms
52,724 KB
testcase_23 AC 118 ms
54,164 KB
testcase_24 AC 115 ms
54,268 KB
testcase_25 AC 105 ms
53,924 KB
testcase_26 AC 107 ms
54,064 KB
testcase_27 AC 94 ms
52,708 KB
testcase_28 AC 100 ms
52,684 KB
testcase_29 AC 104 ms
53,548 KB
testcase_30 AC 96 ms
52,864 KB
testcase_31 AC 96 ms
52,652 KB
testcase_32 AC 105 ms
52,968 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