結果

問題 No.138 化石のバージョン
ユーザー yagi2yagi2
提出日時 2017-04-24 18:25:45
言語 Java21
(openjdk 21)
結果
AC  
実行時間 117 ms / 5,000 ms
コード長 1,071 bytes
コンパイル時間 1,909 ms
コンパイル使用メモリ 73,952 KB
実行使用メモリ 57,372 KB
最終ジャッジ日時 2023-08-28 13:51:05
合計ジャッジ時間 7,436 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
55,656 KB
testcase_01 AC 115 ms
55,668 KB
testcase_02 AC 117 ms
55,456 KB
testcase_03 AC 116 ms
56,048 KB
testcase_04 AC 115 ms
55,392 KB
testcase_05 AC 114 ms
56,008 KB
testcase_06 AC 115 ms
56,200 KB
testcase_07 AC 115 ms
56,028 KB
testcase_08 AC 114 ms
55,684 KB
testcase_09 AC 116 ms
56,064 KB
testcase_10 AC 114 ms
55,780 KB
testcase_11 AC 114 ms
56,408 KB
testcase_12 AC 115 ms
55,664 KB
testcase_13 AC 116 ms
56,164 KB
testcase_14 AC 117 ms
55,592 KB
testcase_15 AC 114 ms
57,372 KB
testcase_16 AC 114 ms
54,076 KB
testcase_17 AC 115 ms
56,024 KB
testcase_18 AC 114 ms
55,752 KB
testcase_19 AC 116 ms
56,164 KB
testcase_20 AC 115 ms
55,360 KB
testcase_21 AC 113 ms
54,224 KB
testcase_22 AC 116 ms
56,012 KB
testcase_23 AC 112 ms
56,288 KB
testcase_24 AC 114 ms
55,372 KB
testcase_25 AC 115 ms
55,656 KB
testcase_26 AC 114 ms
55,624 KB
testcase_27 AC 114 ms
56,040 KB
testcase_28 AC 114 ms
56,292 KB
testcase_29 AC 115 ms
55,732 KB
testcase_30 AC 114 ms
55,700 KB
testcase_31 AC 115 ms
55,888 KB
testcase_32 AC 115 ms
55,808 KB
testcase_33 AC 117 ms
55,856 KB
testcase_34 AC 115 ms
55,424 KB
testcase_35 AC 116 ms
55,400 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String A = sc.next();

        int Amj = Integer.parseInt(A.split("\\.")[0]);
        int Amm = Integer.parseInt(A.split("\\.")[1]);
        int Ami = Integer.parseInt(A.split("\\.")[2]);

        String B = sc.next();

        int Bmj = Integer.parseInt(B.split("\\.")[0]);
        int Bmm = Integer.parseInt(B.split("\\.")[1]);
        int Bmi = Integer.parseInt(B.split("\\.")[2]);

        if (Amj > Bmj) {
            System.out.println("YES");
        } else if (Amj < Bmj) {
            System.out.println("NO");
        } else {
            if (Amm > Bmm) {
                System.out.println("YES");
            } else if (Amm < Bmm) {
                System.out.println("NO");
            } else {
                if (Ami >= Bmi) {
                    System.out.println("YES");
                } else if (Ami < Bmi) {
                    System.out.println("NO");
                }
            }
        }
    }
}
0