結果

問題 No.138 化石のバージョン
ユーザー koukonkokoukonko
提出日時 2015-12-12 16:06:35
言語 Java21
(openjdk 21)
結果
AC  
実行時間 43 ms / 5,000 ms
コード長 706 bytes
コンパイル時間 2,786 ms
コンパイル使用メモリ 71,924 KB
実行使用メモリ 49,708 KB
最終ジャッジ日時 2023-08-28 13:34:29
合計ジャッジ時間 4,651 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
49,360 KB
testcase_01 AC 43 ms
49,296 KB
testcase_02 AC 43 ms
49,328 KB
testcase_03 AC 43 ms
49,160 KB
testcase_04 AC 42 ms
49,376 KB
testcase_05 AC 42 ms
49,244 KB
testcase_06 AC 43 ms
49,304 KB
testcase_07 AC 42 ms
49,292 KB
testcase_08 AC 43 ms
49,532 KB
testcase_09 AC 43 ms
49,648 KB
testcase_10 AC 43 ms
49,360 KB
testcase_11 AC 43 ms
49,232 KB
testcase_12 AC 42 ms
49,200 KB
testcase_13 AC 43 ms
49,428 KB
testcase_14 AC 43 ms
49,400 KB
testcase_15 AC 43 ms
49,208 KB
testcase_16 AC 43 ms
49,332 KB
testcase_17 AC 42 ms
49,464 KB
testcase_18 AC 43 ms
49,220 KB
testcase_19 AC 43 ms
49,244 KB
testcase_20 AC 42 ms
47,824 KB
testcase_21 AC 42 ms
49,428 KB
testcase_22 AC 43 ms
49,236 KB
testcase_23 AC 43 ms
49,144 KB
testcase_24 AC 41 ms
49,184 KB
testcase_25 AC 42 ms
49,160 KB
testcase_26 AC 42 ms
49,260 KB
testcase_27 AC 42 ms
49,708 KB
testcase_28 AC 41 ms
47,376 KB
testcase_29 AC 42 ms
49,300 KB
testcase_30 AC 42 ms
49,192 KB
testcase_31 AC 42 ms
49,328 KB
testcase_32 AC 42 ms
49,160 KB
testcase_33 AC 43 ms
49,464 KB
testcase_34 AC 42 ms
49,292 KB
testcase_35 AC 42 ms
49,292 KB
権限があれば一括ダウンロードができます

ソースコード

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;
				}else if(Integer.parseInt(fir[i]) > Integer.parseInt(sec[i])){
					break;
				}
			}

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