結果

問題 No.138 化石のバージョン
ユーザー mits58mits58
提出日時 2016-07-02 16:39:19
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 5,000 ms
コード長 507 bytes
コンパイル時間 2,719 ms
コンパイル使用メモリ 71,668 KB
実行使用メモリ 56,208 KB
最終ジャッジ日時 2023-08-28 13:42:52
合計ジャッジ時間 7,456 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
55,848 KB
testcase_01 AC 115 ms
55,468 KB
testcase_02 AC 116 ms
55,544 KB
testcase_03 AC 123 ms
55,564 KB
testcase_04 AC 116 ms
55,660 KB
testcase_05 AC 119 ms
55,484 KB
testcase_06 AC 115 ms
56,208 KB
testcase_07 AC 115 ms
55,996 KB
testcase_08 AC 115 ms
55,680 KB
testcase_09 AC 115 ms
55,968 KB
testcase_10 AC 114 ms
55,620 KB
testcase_11 AC 116 ms
56,000 KB
testcase_12 AC 116 ms
56,028 KB
testcase_13 AC 115 ms
55,596 KB
testcase_14 AC 115 ms
55,632 KB
testcase_15 AC 116 ms
55,840 KB
testcase_16 AC 115 ms
55,632 KB
testcase_17 AC 115 ms
55,620 KB
testcase_18 AC 115 ms
55,564 KB
testcase_19 AC 115 ms
56,036 KB
testcase_20 AC 115 ms
55,568 KB
testcase_21 AC 119 ms
55,696 KB
testcase_22 AC 116 ms
55,692 KB
testcase_23 AC 115 ms
56,028 KB
testcase_24 AC 116 ms
55,488 KB
testcase_25 AC 116 ms
55,920 KB
testcase_26 AC 116 ms
53,880 KB
testcase_27 AC 117 ms
56,088 KB
testcase_28 AC 116 ms
55,676 KB
testcase_29 AC 117 ms
55,776 KB
testcase_30 AC 117 ms
55,780 KB
testcase_31 AC 121 ms
55,368 KB
testcase_32 AC 117 ms
55,888 KB
testcase_33 AC 116 ms
56,056 KB
testcase_34 AC 117 ms
55,788 KB
testcase_35 AC 115 ms
55,788 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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