結果

問題 No.138 化石のバージョン
ユーザー shinwisteriashinwisteria
提出日時 2018-03-04 16:24:15
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 5,000 ms
コード長 740 bytes
コンパイル時間 4,184 ms
コンパイル使用メモリ 78,068 KB
実行使用メモリ 57,852 KB
最終ジャッジ日時 2023-09-22 07:49:55
合計ジャッジ時間 10,310 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
55,456 KB
testcase_01 AC 128 ms
57,852 KB
testcase_02 AC 126 ms
55,520 KB
testcase_03 AC 125 ms
55,432 KB
testcase_04 AC 129 ms
55,636 KB
testcase_05 AC 126 ms
55,456 KB
testcase_06 AC 126 ms
55,648 KB
testcase_07 AC 128 ms
55,512 KB
testcase_08 AC 125 ms
55,724 KB
testcase_09 AC 124 ms
55,808 KB
testcase_10 AC 124 ms
55,272 KB
testcase_11 AC 125 ms
55,492 KB
testcase_12 AC 128 ms
55,572 KB
testcase_13 AC 124 ms
55,560 KB
testcase_14 AC 125 ms
55,644 KB
testcase_15 AC 123 ms
55,712 KB
testcase_16 AC 123 ms
55,620 KB
testcase_17 AC 124 ms
55,732 KB
testcase_18 AC 123 ms
55,416 KB
testcase_19 AC 124 ms
55,500 KB
testcase_20 AC 124 ms
55,724 KB
testcase_21 AC 124 ms
55,596 KB
testcase_22 AC 124 ms
55,740 KB
testcase_23 AC 121 ms
55,640 KB
testcase_24 AC 123 ms
55,504 KB
testcase_25 AC 126 ms
55,500 KB
testcase_26 AC 126 ms
55,544 KB
testcase_27 AC 125 ms
55,480 KB
testcase_28 AC 129 ms
55,252 KB
testcase_29 AC 127 ms
55,576 KB
testcase_30 AC 128 ms
55,472 KB
testcase_31 AC 126 ms
55,256 KB
testcase_32 AC 124 ms
55,596 KB
testcase_33 AC 127 ms
55,264 KB
testcase_34 AC 125 ms
55,292 KB
testcase_35 AC 125 ms
55,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package m.shin;
import java.util.Scanner;
public class Con138 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		String[] verA = s.next().split("\\.",3);
		String[] verB = s.next().split("\\.",3);
		s.close();

		int[] A = new int[3] ,B = new int[3];
		for(int i = 0;i < 3;i++){
			A[i] = Integer.parseInt(verA[i]);
			B[i] = Integer.parseInt(verB[i]);
		}

		if(A[0] > B[0]){
			System.out.println("YES");
		}else if(A[0] == B[0]){
			if(A[1] > B[1]){
				System.out.println("YES");
			}else if(A[1] == B[1]){
				if(A[2] >= B[2]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			}else{
				System.out.println("NO");
			}
		}else{
			System.out.println("NO");
		}
	}

}
0