結果

問題 No.138 化石のバージョン
ユーザー chiho_miyako
提出日時 2015-04-09 11:16:07
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 718 bytes
コンパイル時間 1,918 ms
コンパイル使用メモリ 74,948 KB
実行使用メモリ 54,448 KB
最終ジャッジ日時 2024-07-04 13:22:35
合計ジャッジ時間 7,197 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19 WA * 14
権限があれば一括ダウンロードができます

ソースコード

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[4]>c[1]){
            System.out.println("NO");
        }else if(c[5]>c[2]){
            System.out.println("NO");
        }else{
            System.out.println("YES");
        }
    }
}
0