結果

問題 No.138 化石のバージョン
ユーザー marumaru
提出日時 2016-03-23 12:18:48
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 5,000 ms
コード長 1,029 bytes
コンパイル時間 3,416 ms
コンパイル使用メモリ 74,556 KB
実行使用メモリ 58,044 KB
最終ジャッジ日時 2023-08-28 13:38:18
合計ジャッジ時間 9,262 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,644 KB
testcase_01 AC 122 ms
55,804 KB
testcase_02 AC 123 ms
55,524 KB
testcase_03 AC 124 ms
55,724 KB
testcase_04 AC 120 ms
58,044 KB
testcase_05 AC 121 ms
55,724 KB
testcase_06 AC 120 ms
55,848 KB
testcase_07 AC 120 ms
55,948 KB
testcase_08 AC 121 ms
55,808 KB
testcase_09 AC 121 ms
55,540 KB
testcase_10 AC 124 ms
55,776 KB
testcase_11 AC 123 ms
55,572 KB
testcase_12 AC 121 ms
55,980 KB
testcase_13 AC 122 ms
53,776 KB
testcase_14 AC 121 ms
55,784 KB
testcase_15 AC 121 ms
55,544 KB
testcase_16 AC 121 ms
56,168 KB
testcase_17 AC 125 ms
55,640 KB
testcase_18 AC 122 ms
55,376 KB
testcase_19 AC 121 ms
55,840 KB
testcase_20 AC 123 ms
55,768 KB
testcase_21 AC 122 ms
55,388 KB
testcase_22 AC 121 ms
55,668 KB
testcase_23 AC 122 ms
55,588 KB
testcase_24 AC 123 ms
55,800 KB
testcase_25 AC 122 ms
55,620 KB
testcase_26 AC 122 ms
55,596 KB
testcase_27 AC 122 ms
55,424 KB
testcase_28 AC 120 ms
55,664 KB
testcase_29 AC 121 ms
55,868 KB
testcase_30 AC 121 ms
55,812 KB
testcase_31 AC 121 ms
56,328 KB
testcase_32 AC 122 ms
55,824 KB
testcase_33 AC 121 ms
55,640 KB
testcase_34 AC 122 ms
55,796 KB
testcase_35 AC 121 ms
55,816 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 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