結果

問題 No.138 化石のバージョン
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-13 07:11:50
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 5,000 ms
コード長 1,054 bytes
コンパイル時間 1,974 ms
コンパイル使用メモリ 73,672 KB
実行使用メモリ 56,352 KB
最終ジャッジ日時 2023-08-28 13:48:24
合計ジャッジ時間 7,861 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,944 KB
testcase_01 AC 121 ms
56,028 KB
testcase_02 AC 120 ms
55,776 KB
testcase_03 AC 122 ms
56,088 KB
testcase_04 AC 121 ms
55,900 KB
testcase_05 AC 119 ms
55,776 KB
testcase_06 AC 119 ms
56,028 KB
testcase_07 AC 121 ms
55,740 KB
testcase_08 AC 120 ms
56,040 KB
testcase_09 AC 120 ms
55,800 KB
testcase_10 AC 120 ms
56,020 KB
testcase_11 AC 119 ms
55,492 KB
testcase_12 AC 119 ms
55,996 KB
testcase_13 AC 122 ms
55,968 KB
testcase_14 AC 118 ms
56,320 KB
testcase_15 AC 118 ms
56,260 KB
testcase_16 AC 119 ms
56,000 KB
testcase_17 AC 120 ms
55,888 KB
testcase_18 AC 122 ms
55,784 KB
testcase_19 AC 122 ms
56,320 KB
testcase_20 AC 122 ms
53,472 KB
testcase_21 AC 121 ms
55,836 KB
testcase_22 AC 123 ms
56,188 KB
testcase_23 AC 118 ms
55,792 KB
testcase_24 AC 121 ms
56,184 KB
testcase_25 AC 119 ms
55,528 KB
testcase_26 AC 119 ms
56,264 KB
testcase_27 AC 117 ms
55,788 KB
testcase_28 AC 119 ms
55,624 KB
testcase_29 AC 119 ms
55,892 KB
testcase_30 AC 118 ms
55,516 KB
testcase_31 AC 119 ms
55,776 KB
testcase_32 AC 121 ms
56,316 KB
testcase_33 AC 119 ms
55,772 KB
testcase_34 AC 119 ms
56,236 KB
testcase_35 AC 121 ms
56,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s0 = sc.nextLine();
        String [] arr0 = s0.split("\\.");
        int A0 = Integer.parseInt(arr0[0]);
        int B0 = Integer.parseInt(arr0[1]);
        int C0 = Integer.parseInt(arr0[2]);
        String s1 = sc.nextLine();
        String [] arr1 = s1.split("\\.");
        int A1 = Integer.parseInt(arr1[0]);
        int B1 = Integer.parseInt(arr1[1]);
        int C1 = Integer.parseInt(arr1[2]);
        
        if(A1>A0){
            System.out.println("NO");
        }else if(A1<A0){
            System.out.println("YES");
        }else{
            if(B1>B0){
                System.out.println("NO");
            }else if(B1<B0){
                System.out.println("YES");
            }else{
                if(C1>C0){
                    System.out.println("NO");
                }else if(C1<=C0){
                    System.out.println("YES");
                }
            }
        }
    }
}
0