結果

問題 No.138 化石のバージョン
ユーザー nCk_cvnCk_cv
提出日時 2016-01-20 19:43:38
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 5,000 ms
コード長 630 bytes
コンパイル時間 3,351 ms
コンパイル使用メモリ 71,960 KB
実行使用メモリ 57,508 KB
最終ジャッジ日時 2023-08-28 13:36:35
合計ジャッジ時間 8,091 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,700 KB
testcase_01 AC 119 ms
55,632 KB
testcase_02 AC 120 ms
55,920 KB
testcase_03 AC 118 ms
56,192 KB
testcase_04 AC 119 ms
55,624 KB
testcase_05 AC 119 ms
55,640 KB
testcase_06 AC 119 ms
55,876 KB
testcase_07 AC 120 ms
55,688 KB
testcase_08 AC 122 ms
55,664 KB
testcase_09 AC 122 ms
55,728 KB
testcase_10 AC 120 ms
55,492 KB
testcase_11 AC 120 ms
55,536 KB
testcase_12 AC 121 ms
55,540 KB
testcase_13 AC 121 ms
55,660 KB
testcase_14 AC 123 ms
55,488 KB
testcase_15 AC 123 ms
55,708 KB
testcase_16 AC 121 ms
55,700 KB
testcase_17 AC 122 ms
55,616 KB
testcase_18 AC 119 ms
55,696 KB
testcase_19 AC 120 ms
55,308 KB
testcase_20 AC 120 ms
55,492 KB
testcase_21 AC 120 ms
55,560 KB
testcase_22 AC 120 ms
55,600 KB
testcase_23 AC 122 ms
55,652 KB
testcase_24 AC 119 ms
55,668 KB
testcase_25 AC 120 ms
55,788 KB
testcase_26 AC 121 ms
55,528 KB
testcase_27 AC 120 ms
55,660 KB
testcase_28 AC 123 ms
55,616 KB
testcase_29 AC 125 ms
55,572 KB
testcase_30 AC 121 ms
55,956 KB
testcase_31 AC 122 ms
55,572 KB
testcase_32 AC 119 ms
55,588 KB
testcase_33 AC 121 ms
55,664 KB
testcase_34 AC 121 ms
56,016 KB
testcase_35 AC 122 ms
57,508 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.math.*;
import java.io.*;
public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] in1 = sc.next().split("\\.");
		String[] in2 = sc.next().split("\\.");
		int[] a1 = new int[3];
		int[] a2 = new int[3];
		for(int i = 0; i < 3; i++) {
			a1[i] = Integer.parseInt(in1[i]);
			a2[i] = Integer.parseInt(in2[i]);
		}
		for(int i = 0; i < 3; i++) {
			if(a1[i] > a2[i]) {
				System.out.println("YES");
				break;
			}
			if(a1[i] < a2[i]) {
				System.out.println("NO");
				break;
			}
			if(i == 2) {
				System.out.println("YES");
			}
		}
	}
 }
0