結果

問題 No.138 化石のバージョン
ユーザー YamaKasaYamaKasa
提出日時 2018-04-25 23:29:12
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 5,000 ms
コード長 572 bytes
コンパイル時間 2,455 ms
コンパイル使用メモリ 71,840 KB
実行使用メモリ 55,736 KB
最終ジャッジ日時 2023-09-10 05:32:02
合計ジャッジ時間 9,295 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,516 KB
testcase_01 AC 121 ms
55,644 KB
testcase_02 AC 122 ms
55,608 KB
testcase_03 AC 121 ms
55,200 KB
testcase_04 AC 121 ms
55,736 KB
testcase_05 AC 120 ms
53,836 KB
testcase_06 AC 120 ms
55,488 KB
testcase_07 AC 120 ms
55,580 KB
testcase_08 AC 122 ms
55,704 KB
testcase_09 AC 122 ms
55,508 KB
testcase_10 AC 118 ms
55,328 KB
testcase_11 AC 123 ms
55,504 KB
testcase_12 AC 121 ms
55,596 KB
testcase_13 AC 121 ms
55,184 KB
testcase_14 AC 121 ms
55,436 KB
testcase_15 AC 121 ms
55,548 KB
testcase_16 AC 122 ms
55,484 KB
testcase_17 AC 122 ms
55,604 KB
testcase_18 AC 121 ms
55,728 KB
testcase_19 AC 121 ms
55,588 KB
testcase_20 AC 121 ms
55,436 KB
testcase_21 AC 121 ms
55,700 KB
testcase_22 AC 124 ms
55,424 KB
testcase_23 AC 121 ms
55,676 KB
testcase_24 AC 122 ms
55,368 KB
testcase_25 AC 122 ms
55,568 KB
testcase_26 AC 122 ms
55,596 KB
testcase_27 AC 121 ms
55,624 KB
testcase_28 AC 124 ms
55,572 KB
testcase_29 AC 122 ms
55,200 KB
testcase_30 AC 122 ms
55,372 KB
testcase_31 AC 121 ms
55,636 KB
testcase_32 AC 122 ms
55,384 KB
testcase_33 AC 124 ms
55,404 KB
testcase_34 AC 124 ms
55,200 KB
testcase_35 AC 124 ms
55,528 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String s1 = scan.next();
		String s2 = scan.next();
		scan.close();
		String []str1 = s1.split("[.]");
		String []str2 = s2.split("[.]");

		for(int i = 0; i < str1.length; i++) {
			int k1 = Integer.parseInt(str1[i]);
			int k2 = Integer.parseInt(str2[i]);
			if(k1 > k2) {
				System.out.println("YES");
				System.exit(0);
			}else if(k1 < k2){
				System.out.println("NO");
				System.exit(0);
			}
		}
		System.out.println("YES");
	}
}
0