結果

問題 No.138 化石のバージョン
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-13 07:10:44
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 1,053 bytes
コンパイル時間 3,550 ms
コンパイル使用メモリ 71,348 KB
実行使用メモリ 56,388 KB
最終ジャッジ日時 2023-08-17 04:11:05
合計ジャッジ時間 8,208 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,448 KB
testcase_01 AC 122 ms
56,068 KB
testcase_02 AC 119 ms
55,664 KB
testcase_03 AC 121 ms
55,820 KB
testcase_04 AC 121 ms
55,916 KB
testcase_05 AC 119 ms
55,864 KB
testcase_06 AC 121 ms
55,992 KB
testcase_07 AC 122 ms
55,804 KB
testcase_08 AC 122 ms
55,728 KB
testcase_09 AC 127 ms
55,708 KB
testcase_10 AC 125 ms
55,852 KB
testcase_11 AC 124 ms
55,836 KB
testcase_12 AC 123 ms
55,736 KB
testcase_13 AC 123 ms
55,896 KB
testcase_14 AC 123 ms
55,788 KB
testcase_15 AC 122 ms
56,052 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 122 ms
56,388 KB
testcase_20 AC 128 ms
55,808 KB
testcase_21 WA -
testcase_22 AC 121 ms
56,104 KB
testcase_23 AC 119 ms
56,116 KB
testcase_24 AC 120 ms
55,656 KB
testcase_25 AC 118 ms
55,664 KB
testcase_26 AC 122 ms
56,116 KB
testcase_27 AC 120 ms
55,808 KB
testcase_28 AC 121 ms
55,732 KB
testcase_29 AC 122 ms
56,000 KB
testcase_30 AC 122 ms
55,736 KB
testcase_31 AC 127 ms
55,700 KB
testcase_32 AC 125 ms
56,108 KB
testcase_33 AC 126 ms
55,808 KB
testcase_34 AC 126 ms
55,628 KB
testcase_35 AC 128 ms
55,704 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