結果

問題 No.138 化石のバージョン
ユーザー matsuyoshi30matsuyoshi30
提出日時 2018-05-15 00:06:28
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 1,059 bytes
コンパイル時間 3,272 ms
コンパイル使用メモリ 72,544 KB
実行使用メモリ 57,920 KB
最終ジャッジ日時 2023-09-10 20:48:46
合計ジャッジ時間 7,787 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 115 ms
55,624 KB
testcase_01 AC 116 ms
56,236 KB
testcase_02 AC 114 ms
55,780 KB
testcase_03 WA -
testcase_04 AC 115 ms
56,180 KB
testcase_05 AC 114 ms
55,896 KB
testcase_06 AC 115 ms
55,680 KB
testcase_07 AC 115 ms
55,588 KB
testcase_08 AC 116 ms
55,904 KB
testcase_09 AC 116 ms
55,988 KB
testcase_10 AC 115 ms
55,656 KB
testcase_11 AC 115 ms
55,984 KB
testcase_12 AC 115 ms
55,792 KB
testcase_13 AC 115 ms
56,508 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 118 ms
56,048 KB
testcase_20 AC 114 ms
55,632 KB
testcase_21 WA -
testcase_22 AC 118 ms
55,912 KB
testcase_23 AC 115 ms
55,608 KB
testcase_24 AC 115 ms
55,972 KB
testcase_25 AC 114 ms
55,824 KB
testcase_26 AC 114 ms
56,064 KB
testcase_27 AC 114 ms
55,960 KB
testcase_28 AC 116 ms
56,072 KB
testcase_29 AC 115 ms
55,788 KB
testcase_30 AC 114 ms
55,892 KB
testcase_31 AC 114 ms
56,268 KB
testcase_32 AC 116 ms
55,700 KB
testcase_33 AC 115 ms
55,892 KB
testcase_34 AC 115 ms
55,968 KB
testcase_35 AC 115 ms
55,968 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("\\.");

        String ans = "NO";
        for(int i = 0; i < 3; i++) {
            int k = Integer.parseInt(v1[i]);
            int t = Integer.parseInt(v2[i]);
            if(i == 0) {
                if(k > t) {
                    ans = "YES";
                    break;
                } else {
                    if(i == 1) {
                        if(k > t) {
                            ans = "YES";
                            break;
                        } else {
                            if(i == 2) {
                                if(k > t) {
                                    ans = "YES";
                                    break;
                                }
                            }
                        }
                    }
                }
            }
        }

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