結果

問題 No.138 化石のバージョン
ユーザー ohagi_1182ohagi_1182
提出日時 2017-10-20 15:22:54
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 5,000 ms
コード長 615 bytes
コンパイル時間 2,608 ms
コンパイル使用メモリ 71,328 KB
実行使用メモリ 56,116 KB
最終ジャッジ日時 2023-08-28 13:56:56
合計ジャッジ時間 8,485 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
55,836 KB
testcase_01 AC 119 ms
53,588 KB
testcase_02 AC 118 ms
53,556 KB
testcase_03 AC 119 ms
55,852 KB
testcase_04 AC 119 ms
56,116 KB
testcase_05 AC 120 ms
55,280 KB
testcase_06 AC 118 ms
55,820 KB
testcase_07 AC 119 ms
55,444 KB
testcase_08 AC 118 ms
55,376 KB
testcase_09 AC 118 ms
55,916 KB
testcase_10 AC 115 ms
55,628 KB
testcase_11 AC 116 ms
55,604 KB
testcase_12 AC 118 ms
55,284 KB
testcase_13 AC 116 ms
55,756 KB
testcase_14 AC 116 ms
53,876 KB
testcase_15 AC 118 ms
55,368 KB
testcase_16 AC 117 ms
55,584 KB
testcase_17 AC 121 ms
55,364 KB
testcase_18 AC 121 ms
55,624 KB
testcase_19 AC 120 ms
55,328 KB
testcase_20 AC 121 ms
55,400 KB
testcase_21 AC 128 ms
55,620 KB
testcase_22 AC 120 ms
55,656 KB
testcase_23 AC 116 ms
55,472 KB
testcase_24 AC 116 ms
55,804 KB
testcase_25 AC 119 ms
53,644 KB
testcase_26 AC 115 ms
55,436 KB
testcase_27 AC 117 ms
55,520 KB
testcase_28 AC 119 ms
55,596 KB
testcase_29 AC 119 ms
55,480 KB
testcase_30 AC 119 ms
55,500 KB
testcase_31 AC 117 ms
55,808 KB
testcase_32 AC 118 ms
55,424 KB
testcase_33 AC 117 ms
55,860 KB
testcase_34 AC 116 ms
55,420 KB
testcase_35 AC 117 ms
55,896 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String a0 = sc.next();
		String a1 = sc.next();
		String[] s1 = a0.split("\\.");
		String[] s2 = a1.split("\\.");
		String ans = "";
		for(int i = 0 ; i < s1.length ; i++) {
			if(Integer.valueOf(s1[i]) > Integer.valueOf(s2[i])) {
				ans = "YES";
				break;
			} else if(Integer.valueOf(s1[i]) < Integer.valueOf(s2[i])){
				ans = "NO";
				break;
			} else if(Integer.valueOf(s1[i]) == Integer.valueOf(s2[i]) && i == 2) {
				ans = "YES";
			}
		}
		System.out.println(ans);
 	}
}

0