結果

問題 No.138 化石のバージョン
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-13 07:08:23
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 1,052 bytes
コンパイル時間 2,169 ms
コンパイル使用メモリ 73,912 KB
実行使用メモリ 57,948 KB
最終ジャッジ日時 2023-08-17 04:10:34
合計ジャッジ時間 7,713 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,808 KB
testcase_01 AC 124 ms
55,484 KB
testcase_02 AC 120 ms
55,988 KB
testcase_03 WA -
testcase_04 AC 118 ms
55,644 KB
testcase_05 AC 119 ms
55,872 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 120 ms
55,572 KB
testcase_20 AC 120 ms
56,316 KB
testcase_21 WA -
testcase_22 AC 122 ms
55,704 KB
testcase_23 AC 119 ms
55,948 KB
testcase_24 AC 119 ms
57,892 KB
testcase_25 AC 120 ms
55,816 KB
testcase_26 WA -
testcase_27 AC 117 ms
55,912 KB
testcase_28 AC 119 ms
56,156 KB
testcase_29 AC 119 ms
55,852 KB
testcase_30 AC 118 ms
55,768 KB
testcase_31 AC 117 ms
55,808 KB
testcase_32 AC 119 ms
55,544 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
権限があれば一括ダウンロードができます

ソースコード

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