結果

問題 No.138 化石のバージョン
ユーザー chiho_miyakochiho_miyako
提出日時 2015-04-09 11:22:49
言語 Java21
(openjdk 21)
結果
AC  
実行時間 121 ms / 5,000 ms
コード長 869 bytes
コンパイル時間 3,326 ms
コンパイル使用メモリ 74,064 KB
実行使用メモリ 56,120 KB
最終ジャッジ日時 2023-08-28 13:20:32
合計ジャッジ時間 7,744 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
55,532 KB
testcase_01 AC 117 ms
55,756 KB
testcase_02 AC 114 ms
55,704 KB
testcase_03 AC 117 ms
55,492 KB
testcase_04 AC 118 ms
55,676 KB
testcase_05 AC 117 ms
55,496 KB
testcase_06 AC 117 ms
56,000 KB
testcase_07 AC 118 ms
56,020 KB
testcase_08 AC 118 ms
55,560 KB
testcase_09 AC 120 ms
55,648 KB
testcase_10 AC 118 ms
56,120 KB
testcase_11 AC 115 ms
55,296 KB
testcase_12 AC 117 ms
55,600 KB
testcase_13 AC 116 ms
55,716 KB
testcase_14 AC 116 ms
55,820 KB
testcase_15 AC 118 ms
55,520 KB
testcase_16 AC 118 ms
55,852 KB
testcase_17 AC 115 ms
55,556 KB
testcase_18 AC 115 ms
55,320 KB
testcase_19 AC 116 ms
55,360 KB
testcase_20 AC 118 ms
55,800 KB
testcase_21 AC 117 ms
55,416 KB
testcase_22 AC 121 ms
55,376 KB
testcase_23 AC 117 ms
55,856 KB
testcase_24 AC 116 ms
55,524 KB
testcase_25 AC 117 ms
55,584 KB
testcase_26 AC 117 ms
55,548 KB
testcase_27 AC 117 ms
55,672 KB
testcase_28 AC 116 ms
55,604 KB
testcase_29 AC 117 ms
55,748 KB
testcase_30 AC 117 ms
55,580 KB
testcase_31 AC 117 ms
55,572 KB
testcase_32 AC 117 ms
55,616 KB
testcase_33 AC 117 ms
55,592 KB
testcase_34 AC 116 ms
55,800 KB
testcase_35 AC 118 ms
55,300 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner koko = new Scanner(System.in);
        String a = koko.next();
        String b = koko.next();
        String[] ah = a.split("\\.");
        String[] bh = b.split("\\.");
        int[] c = new int[6];
        for(int i=0; i<3; i++){
            c[i] = Integer.parseInt(ah[i]);
            c[i+3] = Integer.parseInt(bh[i]);
        }
        if(c[3]>c[0]){
            System.out.println("NO");
        }else if(c[3]<c[0]){
            System.out.println("YES");
        }else if(c[4]>c[1]){
            System.out.println("NO");
        }else if(c[4]<c[1]){
            System.out.println("YES");
        }else if(c[5]>c[2]){
            System.out.println("NO");
        }else if(c[5]<=c[2]){
            System.out.println("YES");
        }
    }
}
0