結果

問題 No.138 化石のバージョン
ユーザー DemocoDemoco
提出日時 2015-05-03 15:41:45
言語 Java21
(openjdk 21)
結果
AC  
実行時間 122 ms / 5,000 ms
コード長 641 bytes
コンパイル時間 4,277 ms
コンパイル使用メモリ 71,960 KB
実行使用メモリ 56,152 KB
最終ジャッジ日時 2023-08-28 13:22:41
合計ジャッジ時間 8,315 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,676 KB
testcase_01 AC 117 ms
55,644 KB
testcase_02 AC 119 ms
55,944 KB
testcase_03 AC 120 ms
55,788 KB
testcase_04 AC 119 ms
55,344 KB
testcase_05 AC 119 ms
55,576 KB
testcase_06 AC 121 ms
55,756 KB
testcase_07 AC 122 ms
55,764 KB
testcase_08 AC 121 ms
56,112 KB
testcase_09 AC 121 ms
55,660 KB
testcase_10 AC 117 ms
55,852 KB
testcase_11 AC 117 ms
55,896 KB
testcase_12 AC 118 ms
55,532 KB
testcase_13 AC 117 ms
55,744 KB
testcase_14 AC 117 ms
55,660 KB
testcase_15 AC 116 ms
55,816 KB
testcase_16 AC 118 ms
55,676 KB
testcase_17 AC 118 ms
55,456 KB
testcase_18 AC 116 ms
56,088 KB
testcase_19 AC 116 ms
55,784 KB
testcase_20 AC 116 ms
55,564 KB
testcase_21 AC 121 ms
56,152 KB
testcase_22 AC 116 ms
55,660 KB
testcase_23 AC 117 ms
53,536 KB
testcase_24 AC 118 ms
55,316 KB
testcase_25 AC 119 ms
55,492 KB
testcase_26 AC 118 ms
55,476 KB
testcase_27 AC 118 ms
55,588 KB
testcase_28 AC 119 ms
56,068 KB
testcase_29 AC 121 ms
55,716 KB
testcase_30 AC 121 ms
55,548 KB
testcase_31 AC 118 ms
55,960 KB
testcase_32 AC 118 ms
55,740 KB
testcase_33 AC 119 ms
55,832 KB
testcase_34 AC 117 ms
56,088 KB
testcase_35 AC 117 ms
55,980 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
class Yukico138 {
	public static void main(String[] args) {
		Scanner stdio = new Scanner(System.in);
		String s0 = stdio.next();
		String s1 = stdio.next();
		String[] ver0 = new String[3];
		String[] ver1 = new String[3];
		ver0 = s0.split("[.]");
		ver1 = s1.split("[.]");
		boolean yes = true;
		for(int i=0; i<3; i++) {
			if(Integer.parseInt(ver0[i]) == Integer.parseInt(ver1[i])) {
				continue;
			}else if(Integer.parseInt(ver0[i]) < Integer.parseInt(ver1[i])) {
				yes = false;
				break;
			}else {
				break;
			}
		}
		if(yes) {
			System.out.println("YES");
		} else {
			System.out.println("NO");
		}
	}
}
0