結果

問題 No.138 化石のバージョン
ユーザー matsuyoshi30matsuyoshi30
提出日時 2018-05-15 00:28:15
言語 Java21
(openjdk 21)
結果
AC  
実行時間 122 ms / 5,000 ms
コード長 774 bytes
コンパイル時間 2,023 ms
コンパイル使用メモリ 72,092 KB
実行使用メモリ 56,308 KB
最終ジャッジ日時 2023-09-10 20:49:52
合計ジャッジ時間 7,757 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,980 KB
testcase_01 AC 118 ms
55,328 KB
testcase_02 AC 117 ms
55,592 KB
testcase_03 AC 117 ms
55,848 KB
testcase_04 AC 117 ms
55,808 KB
testcase_05 AC 118 ms
55,544 KB
testcase_06 AC 118 ms
56,120 KB
testcase_07 AC 117 ms
56,052 KB
testcase_08 AC 122 ms
55,736 KB
testcase_09 AC 118 ms
55,624 KB
testcase_10 AC 117 ms
55,980 KB
testcase_11 AC 118 ms
55,608 KB
testcase_12 AC 118 ms
55,844 KB
testcase_13 AC 118 ms
55,720 KB
testcase_14 AC 118 ms
55,836 KB
testcase_15 AC 120 ms
55,936 KB
testcase_16 AC 117 ms
55,892 KB
testcase_17 AC 117 ms
55,628 KB
testcase_18 AC 116 ms
55,652 KB
testcase_19 AC 118 ms
55,680 KB
testcase_20 AC 117 ms
55,536 KB
testcase_21 AC 119 ms
56,024 KB
testcase_22 AC 118 ms
55,788 KB
testcase_23 AC 117 ms
55,884 KB
testcase_24 AC 117 ms
55,988 KB
testcase_25 AC 116 ms
55,556 KB
testcase_26 AC 117 ms
56,308 KB
testcase_27 AC 116 ms
55,636 KB
testcase_28 AC 116 ms
55,596 KB
testcase_29 AC 116 ms
56,052 KB
testcase_30 AC 116 ms
56,056 KB
testcase_31 AC 118 ms
56,072 KB
testcase_32 AC 116 ms
55,956 KB
testcase_33 AC 117 ms
55,896 KB
testcase_34 AC 116 ms
55,692 KB
testcase_35 AC 115 ms
55,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String[] v1 = in.next().split("\\.");
        String[] v2 = in.next().split("\\.");

        int[] k = new int[3];
        int[] t = new int[3];
        for(int i = 0; i < 3; i++) {
            k[i] = Integer.parseInt(v1[i]);
            t[i] = Integer.parseInt(v2[i]);
        }

        String ans = "NO";

        if(k[0] > t[0]) {
            ans = "YES";
        } else if(k[0] == t[0]) {
            if(k[1] > t[1]) {
                ans = "YES";
            } else if(k[1] == t[1]) {
                if(k[2] >= t[2]) {
                    ans = "YES";
                }
            }
        }

        System.out.println(ans);
    }
}
0