結果

問題 No.138 化石のバージョン
ユーザー YukimotoPGYukimotoPG
提出日時 2019-02-14 13:54:01
言語 Java19
(openjdk 21)
結果
AC  
実行時間 120 ms / 5,000 ms
コード長 474 bytes
コンパイル時間 1,982 ms
コンパイル使用メモリ 72,156 KB
実行使用メモリ 56,260 KB
最終ジャッジ日時 2023-10-11 12:35:28
合計ジャッジ時間 7,741 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 115 ms
55,508 KB
testcase_01 AC 116 ms
55,604 KB
testcase_02 AC 117 ms
55,804 KB
testcase_03 AC 114 ms
55,752 KB
testcase_04 AC 119 ms
55,480 KB
testcase_05 AC 115 ms
56,260 KB
testcase_06 AC 114 ms
55,536 KB
testcase_07 AC 115 ms
55,472 KB
testcase_08 AC 115 ms
55,400 KB
testcase_09 AC 120 ms
55,684 KB
testcase_10 AC 117 ms
55,664 KB
testcase_11 AC 115 ms
55,648 KB
testcase_12 AC 116 ms
56,180 KB
testcase_13 AC 115 ms
55,816 KB
testcase_14 AC 115 ms
55,644 KB
testcase_15 AC 117 ms
55,504 KB
testcase_16 AC 117 ms
55,684 KB
testcase_17 AC 120 ms
55,280 KB
testcase_18 AC 120 ms
55,480 KB
testcase_19 AC 119 ms
53,940 KB
testcase_20 AC 118 ms
55,604 KB
testcase_21 AC 118 ms
55,744 KB
testcase_22 AC 116 ms
56,140 KB
testcase_23 AC 116 ms
55,720 KB
testcase_24 AC 115 ms
55,596 KB
testcase_25 AC 114 ms
55,672 KB
testcase_26 AC 116 ms
55,940 KB
testcase_27 AC 115 ms
55,584 KB
testcase_28 AC 115 ms
55,664 KB
testcase_29 AC 116 ms
56,132 KB
testcase_30 AC 118 ms
55,772 KB
testcase_31 AC 115 ms
55,824 KB
testcase_32 AC 116 ms
56,228 KB
testcase_33 AC 117 ms
55,720 KB
testcase_34 AC 117 ms
55,972 KB
testcase_35 AC 116 ms
55,684 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		
		String[] a = sc.next().split("\\.",0);
		String[] b = sc.next().split("\\.",0);
		String ans = "YES";
		
		
		for (int i=0; i<3; i++) {
			int t1 = Integer.parseInt(b[i]);
			int t2 = Integer.parseInt(a[i]);
			
			if (t1 < t2) {
				ans = "YES"; break;
			}
			else if (t1 > t2) {
				ans = "NO"; break;
			}
		}
		System.out.println(ans);
		
	}
}
0