結果

問題 No.138 化石のバージョン
ユーザー YukimotoPGYukimotoPG
提出日時 2019-02-14 13:49:58
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 540 bytes
コンパイル時間 2,083 ms
コンパイル使用メモリ 71,108 KB
実行使用メモリ 57,636 KB
最終ジャッジ日時 2023-10-11 12:35:15
合計ジャッジ時間 7,742 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
55,460 KB
testcase_01 AC 118 ms
56,300 KB
testcase_02 AC 119 ms
56,268 KB
testcase_03 AC 118 ms
55,848 KB
testcase_04 AC 117 ms
55,716 KB
testcase_05 AC 117 ms
55,832 KB
testcase_06 AC 118 ms
53,680 KB
testcase_07 AC 120 ms
55,700 KB
testcase_08 AC 117 ms
55,856 KB
testcase_09 AC 117 ms
55,844 KB
testcase_10 AC 118 ms
55,724 KB
testcase_11 AC 119 ms
55,708 KB
testcase_12 WA -
testcase_13 AC 119 ms
55,772 KB
testcase_14 WA -
testcase_15 AC 118 ms
55,608 KB
testcase_16 AC 117 ms
55,828 KB
testcase_17 AC 117 ms
56,044 KB
testcase_18 AC 118 ms
55,716 KB
testcase_19 AC 119 ms
55,388 KB
testcase_20 AC 119 ms
55,652 KB
testcase_21 AC 117 ms
56,008 KB
testcase_22 AC 119 ms
53,740 KB
testcase_23 AC 115 ms
55,844 KB
testcase_24 AC 117 ms
55,984 KB
testcase_25 AC 118 ms
55,756 KB
testcase_26 AC 117 ms
56,184 KB
testcase_27 AC 117 ms
55,768 KB
testcase_28 AC 116 ms
55,872 KB
testcase_29 WA -
testcase_30 AC 118 ms
55,600 KB
testcase_31 WA -
testcase_32 AC 118 ms
55,688 KB
testcase_33 WA -
testcase_34 AC 121 ms
55,584 KB
testcase_35 WA -
権限があれば一括ダウンロードができます

ソースコード

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++) {
			if (b[i].compareTo(a[i]) < 0) {
				ans = "YES"; break;
			}
			else if (b[i].compareTo(a[i]) == 0) {
				continue;
			}
			else {
				ans = "NO"; break;
			}
			
			
//			if (b[i].compareTo(a[i]) < 0) {
//				ans = "YES"; break;
//			}
		}
		System.out.println(ans);
		
	}
}
0