結果

問題 No.138 化石のバージョン
ユーザー koukonko
提出日時 2015-12-12 16:04:29
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 627 bytes
コンパイル時間 2,060 ms
コンパイル使用メモリ 74,388 KB
実行使用メモリ 50,392 KB
最終ジャッジ日時 2024-09-15 08:44:38
合計ジャッジ時間 5,043 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) {
		BufferedReader read = new BufferedReader(new InputStreamReader(System.in));
		try {

			String[] fir = read.readLine().split("\\.");
			String[] sec = read.readLine().split("\\.");

			boolean flag = false;
			for (int i = 0; i < 3; ++i) {
				if (Integer.parseInt(fir[i]) < Integer.parseInt(sec[i])) {
					flag = true;
					break;
				}
			}

			if (flag) {
				System.out.println("NO");
			} else {
				System.out.println("YES");
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
0