結果

問題 No.138 化石のバージョン
ユーザー kohaku_kohaku
提出日時 2016-11-13 07:08:23
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 1,052 bytes
コンパイル時間 1,852 ms
コンパイル使用メモリ 77,656 KB
実行使用メモリ 41,456 KB
最終ジャッジ日時 2024-11-25 21:47:47
合計ジャッジ時間 6,800 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 15 WA * 18
権限があれば一括ダウンロードができます

ソースコード

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