結果

問題 No.138 化石のバージョン
ユーザー YukimotoPGYukimotoPG
提出日時 2019-02-14 13:49:32
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 539 bytes
コンパイル時間 1,922 ms
コンパイル使用メモリ 72,048 KB
実行使用メモリ 58,464 KB
最終ジャッジ日時 2023-10-11 12:35:01
合計ジャッジ時間 7,434 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 115 ms
56,192 KB
testcase_01 AC 114 ms
55,292 KB
testcase_02 AC 115 ms
55,536 KB
testcase_03 AC 114 ms
56,232 KB
testcase_04 AC 114 ms
56,252 KB
testcase_05 AC 115 ms
55,700 KB
testcase_06 AC 116 ms
55,780 KB
testcase_07 AC 114 ms
55,788 KB
testcase_08 AC 116 ms
55,528 KB
testcase_09 AC 115 ms
55,912 KB
testcase_10 AC 115 ms
55,648 KB
testcase_11 AC 115 ms
55,744 KB
testcase_12 WA -
testcase_13 AC 120 ms
56,000 KB
testcase_14 WA -
testcase_15 AC 116 ms
55,908 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 115 ms
55,636 KB
testcase_20 AC 117 ms
56,052 KB
testcase_21 WA -
testcase_22 AC 114 ms
55,580 KB
testcase_23 AC 114 ms
55,928 KB
testcase_24 AC 113 ms
56,392 KB
testcase_25 AC 116 ms
55,932 KB
testcase_26 AC 115 ms
56,172 KB
testcase_27 AC 115 ms
55,824 KB
testcase_28 AC 114 ms
55,248 KB
testcase_29 WA -
testcase_30 AC 115 ms
55,760 KB
testcase_31 WA -
testcase_32 AC 114 ms
55,868 KB
testcase_33 WA -
testcase_34 AC 116 ms
56,060 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 = "NO";
		
		
		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