結果

問題 No.138 化石のバージョン
ユーザー fkwnw3_1243fkwnw3_1243
提出日時 2017-04-29 17:41:47
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 988 bytes
コンパイル時間 3,077 ms
コンパイル使用メモリ 77,192 KB
実行使用メモリ 50,972 KB
最終ジャッジ日時 2023-10-11 23:05:16
合計ジャッジ時間 9,528 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
50,564 KB
testcase_01 AC 60 ms
50,572 KB
testcase_02 AC 60 ms
50,420 KB
testcase_03 AC 60 ms
50,500 KB
testcase_04 AC 66 ms
50,516 KB
testcase_05 AC 66 ms
50,516 KB
testcase_06 AC 61 ms
50,844 KB
testcase_07 AC 61 ms
50,600 KB
testcase_08 AC 61 ms
50,520 KB
testcase_09 AC 61 ms
50,584 KB
testcase_10 AC 61 ms
50,576 KB
testcase_11 AC 61 ms
50,568 KB
testcase_12 AC 60 ms
50,400 KB
testcase_13 AC 60 ms
50,468 KB
testcase_14 AC 60 ms
50,580 KB
testcase_15 AC 59 ms
50,456 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 61 ms
50,544 KB
testcase_20 AC 61 ms
50,436 KB
testcase_21 WA -
testcase_22 AC 61 ms
50,676 KB
testcase_23 AC 60 ms
48,660 KB
testcase_24 AC 62 ms
50,664 KB
testcase_25 AC 61 ms
50,664 KB
testcase_26 AC 62 ms
50,672 KB
testcase_27 AC 61 ms
50,940 KB
testcase_28 AC 60 ms
50,608 KB
testcase_29 AC 59 ms
50,572 KB
testcase_30 AC 79 ms
50,688 KB
testcase_31 AC 60 ms
50,600 KB
testcase_32 AC 60 ms
50,456 KB
testcase_33 AC 59 ms
50,356 KB
testcase_34 AC 60 ms
50,528 KB
testcase_35 AC 60 ms
50,608 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.stream.Stream;

import static java.lang.System.in;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
        String[] S = reader.readLine().split("\\.");
        String[] M = reader.readLine().split("\\.");
        
        int[] possibleOldVersion = Stream.of(S).mapToInt(Integer::parseInt).toArray();
        int[] targetVersion = Stream.of(M).mapToInt(Integer::parseInt).toArray();

        for (int i = 0; i < 3; i++) {

            if (possibleOldVersion[i] < targetVersion[i]) {
                System.out.println("NO");
                break;
            } else if (possibleOldVersion[i] == targetVersion[i]) {

            } else {

                System.out.println("YES");
                break;
            }

        }
    }
}
0