結果

問題 No.138 化石のバージョン
ユーザー kou6839kou6839
提出日時 2015-01-30 22:44:51
言語 Java21
(openjdk 21)
結果
AC  
実行時間 120 ms / 5,000 ms
コード長 1,169 bytes
コンパイル時間 2,142 ms
コンパイル使用メモリ 74,472 KB
実行使用メモリ 56,336 KB
最終ジャッジ日時 2023-08-28 13:13:12
合計ジャッジ時間 7,938 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
55,672 KB
testcase_01 AC 118 ms
55,772 KB
testcase_02 AC 115 ms
55,788 KB
testcase_03 AC 117 ms
55,816 KB
testcase_04 AC 117 ms
56,048 KB
testcase_05 AC 114 ms
55,776 KB
testcase_06 AC 117 ms
55,780 KB
testcase_07 AC 116 ms
55,908 KB
testcase_08 AC 114 ms
55,760 KB
testcase_09 AC 115 ms
55,640 KB
testcase_10 AC 114 ms
56,040 KB
testcase_11 AC 115 ms
55,632 KB
testcase_12 AC 117 ms
55,956 KB
testcase_13 AC 117 ms
55,764 KB
testcase_14 AC 120 ms
55,688 KB
testcase_15 AC 120 ms
55,628 KB
testcase_16 AC 118 ms
55,932 KB
testcase_17 AC 118 ms
55,756 KB
testcase_18 AC 116 ms
53,996 KB
testcase_19 AC 116 ms
55,904 KB
testcase_20 AC 118 ms
55,944 KB
testcase_21 AC 118 ms
55,948 KB
testcase_22 AC 116 ms
55,724 KB
testcase_23 AC 117 ms
55,736 KB
testcase_24 AC 116 ms
55,664 KB
testcase_25 AC 115 ms
55,924 KB
testcase_26 AC 115 ms
55,448 KB
testcase_27 AC 116 ms
55,956 KB
testcase_28 AC 116 ms
55,776 KB
testcase_29 AC 118 ms
55,956 KB
testcase_30 AC 118 ms
55,460 KB
testcase_31 AC 116 ms
55,700 KB
testcase_32 AC 117 ms
56,088 KB
testcase_33 AC 116 ms
56,292 KB
testcase_34 AC 117 ms
55,988 KB
testcase_35 AC 116 ms
56,336 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.math.*;
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String aString = sc.next();
        String bString=sc.next();
        StringTokenizer aa = new StringTokenizer(aString, ".");
        StringTokenizer bb = new StringTokenizer(bString, ".");
        int a1=Integer.parseInt(aa.nextToken());
        int a2=Integer.parseInt(aa.nextToken());
        int a3=Integer.parseInt(aa.nextToken());
        int b1 = Integer.parseInt(bb.nextToken());
        int b2 = Integer.parseInt(bb.nextToken());
        int b3 = Integer.parseInt(bb.nextToken());
        if(a1<b1 ){
        	System.out.println("NO");
        	return;
        }else if(a1==b1){
        }else{
        	System.out.println("YES");
        	return;
        }
        if(a2<b2){
        	System.out.println("NO");
        	return;
        }else if(a2==b2){
        }else{
        	System.out.println("YES");
        	return;
        }
        if(a3<b3 ){
        	System.out.println("NO");
        	return;
        }else{
        	System.out.println("YES");
        	return;
        }
        
    }
}			
0