結果

問題 No.138 化石のバージョン
ユーザー jimanojimano
提出日時 2018-01-13 21:27:06
言語 Java21
(openjdk 21)
結果
AC  
実行時間 46 ms / 5,000 ms
コード長 873 bytes
コンパイル時間 4,840 ms
コンパイル使用メモリ 73,588 KB
実行使用メモリ 49,588 KB
最終ジャッジ日時 2023-08-28 13:59:30
合計ジャッジ時間 6,359 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
49,308 KB
testcase_01 AC 44 ms
49,116 KB
testcase_02 AC 43 ms
49,180 KB
testcase_03 AC 45 ms
49,212 KB
testcase_04 AC 44 ms
49,260 KB
testcase_05 AC 46 ms
49,132 KB
testcase_06 AC 45 ms
49,244 KB
testcase_07 AC 44 ms
49,200 KB
testcase_08 AC 44 ms
49,532 KB
testcase_09 AC 44 ms
49,220 KB
testcase_10 AC 44 ms
49,228 KB
testcase_11 AC 45 ms
49,292 KB
testcase_12 AC 44 ms
49,224 KB
testcase_13 AC 43 ms
49,220 KB
testcase_14 AC 45 ms
49,064 KB
testcase_15 AC 44 ms
49,492 KB
testcase_16 AC 43 ms
49,280 KB
testcase_17 AC 44 ms
49,116 KB
testcase_18 AC 45 ms
49,276 KB
testcase_19 AC 43 ms
49,216 KB
testcase_20 AC 44 ms
49,440 KB
testcase_21 AC 44 ms
49,116 KB
testcase_22 AC 43 ms
49,164 KB
testcase_23 AC 44 ms
49,188 KB
testcase_24 AC 44 ms
49,264 KB
testcase_25 AC 46 ms
49,300 KB
testcase_26 AC 45 ms
48,968 KB
testcase_27 AC 44 ms
49,336 KB
testcase_28 AC 45 ms
49,380 KB
testcase_29 AC 44 ms
49,248 KB
testcase_30 AC 45 ms
49,488 KB
testcase_31 AC 45 ms
49,588 KB
testcase_32 AC 45 ms
49,176 KB
testcase_33 AC 45 ms
49,092 KB
testcase_34 AC 45 ms
49,124 KB
testcase_35 AC 45 ms
49,252 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package me.yukicoder.lv1;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class No0138 {
	public static void main(String[] args) {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			String[] s1 = br.readLine().split("\\.");
			String[] s2 = br.readLine().split("\\.");
			int[][] v = new int[2][3];

			for (int i = 0; i < s1.length; i++) {
				v[0][i] = Integer.parseInt(s1[i]);
				v[1][i] = Integer.parseInt(s2[i]);
			}

			for (int j = 0; j < 3; j++) {
				if (v[0][j] > v[1][j]) {
					System.out.println("YES");
					break;
				} else if (v[0][j] < v[1][j]) {
					System.out.println("NO");
					break;
				} else if (j == 2 && v[0][j] == v[1][j]) {
					System.out.println("YES");
				}
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
0