結果

問題 No.138 化石のバージョン
ユーザー matsuyoshi30
提出日時 2018-05-15 00:02:31
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 512 bytes
コンパイル時間 2,078 ms
コンパイル使用メモリ 73,984 KB
実行使用メモリ 56,032 KB
最終ジャッジ日時 2024-06-28 11:53:56
合計ジャッジ時間 7,978 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String[] v1 = in.next().split("\\.");
        String[] v2 = in.next().split("\\.");

        String ans = "YES";
        for(int i = 0; i < 3; i++) {
            int k = Integer.parseInt(v1[i]);
            int t = Integer.parseInt(v2[i]);
            if(k < t) {
                ans = "NO";
                break;
            }
        }

        System.out.println(ans);
    }
}
0