結果

問題 No.138 化石のバージョン
ユーザー marumaru
提出日時 2016-03-23 12:15:52
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 943 bytes
コンパイル時間 3,421 ms
コンパイル使用メモリ 78,012 KB
実行使用メモリ 54,508 KB
最終ジャッジ日時 2024-04-09 19:19:00
合計ジャッジ時間 7,621 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 91 ms
52,744 KB
testcase_01 AC 95 ms
53,000 KB
testcase_02 AC 93 ms
52,852 KB
testcase_03 AC 104 ms
54,180 KB
testcase_04 AC 100 ms
54,016 KB
testcase_05 AC 104 ms
53,992 KB
testcase_06 AC 103 ms
53,880 KB
testcase_07 AC 95 ms
53,140 KB
testcase_08 AC 104 ms
54,320 KB
testcase_09 AC 102 ms
53,976 KB
testcase_10 AC 100 ms
52,660 KB
testcase_11 AC 110 ms
54,160 KB
testcase_12 AC 108 ms
53,896 KB
testcase_13 AC 113 ms
54,052 KB
testcase_14 AC 94 ms
53,016 KB
testcase_15 AC 98 ms
53,576 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 98 ms
52,820 KB
testcase_20 AC 111 ms
53,804 KB
testcase_21 WA -
testcase_22 AC 105 ms
53,728 KB
testcase_23 AC 90 ms
52,336 KB
testcase_24 AC 105 ms
53,884 KB
testcase_25 AC 104 ms
53,740 KB
testcase_26 AC 93 ms
52,824 KB
testcase_27 AC 102 ms
54,060 KB
testcase_28 AC 102 ms
53,860 KB
testcase_29 AC 103 ms
53,872 KB
testcase_30 AC 104 ms
53,900 KB
testcase_31 AC 100 ms
54,076 KB
testcase_32 AC 98 ms
53,964 KB
testcase_33 AC 101 ms
53,828 KB
testcase_34 AC 102 ms
54,312 KB
testcase_35 AC 101 ms
54,228 KB
権限があれば一括ダウンロードができます

ソースコード

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("\\.");
		
		int[] a_number = new int[a_str.length];
		int[] b_number = new int[b_str.length];
		
		
		for (int i = 0; i < a_str.length; i++) {
			a_number[i] = Integer.parseInt(a_str[i]);
			b_number[i] = Integer.parseInt(b_str[i]);
		}
		
		if (a_number[0] > b_number[0]) {
			System.out.println("YES");
		} else if (a_number[0] == b_number[0]) {
			if (a_number[1] > b_number[1]) {
				System.out.println("YES");
			} else if (a_number[1] == b_number[1]) {
				if (a_number[2] > b_number[2]) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} else {
				System.out.println("NO");
			}
		} else {
			System.out.println("NO");
		}
	}
}
0