結果

問題 No.138 化石のバージョン
ユーザー tatsuyatatsuya
提出日時 2015-05-31 16:05:04
言語 Java21
(openjdk 21)
結果
AC  
実行時間 121 ms / 5,000 ms
コード長 658 bytes
コンパイル時間 2,025 ms
コンパイル使用メモリ 71,572 KB
実行使用メモリ 56,168 KB
最終ジャッジ日時 2023-08-28 13:25:29
合計ジャッジ時間 7,826 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,848 KB
testcase_01 AC 116 ms
56,072 KB
testcase_02 AC 117 ms
56,024 KB
testcase_03 AC 116 ms
55,664 KB
testcase_04 AC 119 ms
55,616 KB
testcase_05 AC 117 ms
55,680 KB
testcase_06 AC 118 ms
55,968 KB
testcase_07 AC 119 ms
56,072 KB
testcase_08 AC 120 ms
56,080 KB
testcase_09 AC 118 ms
55,916 KB
testcase_10 AC 119 ms
56,040 KB
testcase_11 AC 118 ms
55,636 KB
testcase_12 AC 119 ms
56,096 KB
testcase_13 AC 118 ms
55,732 KB
testcase_14 AC 119 ms
55,780 KB
testcase_15 AC 117 ms
55,724 KB
testcase_16 AC 118 ms
55,600 KB
testcase_17 AC 120 ms
55,444 KB
testcase_18 AC 119 ms
55,820 KB
testcase_19 AC 117 ms
55,924 KB
testcase_20 AC 118 ms
55,704 KB
testcase_21 AC 120 ms
55,800 KB
testcase_22 AC 119 ms
55,672 KB
testcase_23 AC 117 ms
55,608 KB
testcase_24 AC 120 ms
55,724 KB
testcase_25 AC 118 ms
55,728 KB
testcase_26 AC 117 ms
55,932 KB
testcase_27 AC 118 ms
55,652 KB
testcase_28 AC 119 ms
56,004 KB
testcase_29 AC 118 ms
55,652 KB
testcase_30 AC 119 ms
55,848 KB
testcase_31 AC 119 ms
53,608 KB
testcase_32 AC 119 ms
56,168 KB
testcase_33 AC 119 ms
55,472 KB
testcase_34 AC 121 ms
55,716 KB
testcase_35 AC 118 ms
55,712 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.Scanner;

class Test{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str1 = sc.next(), str2 = sc.next();

        String[] a = str1.split("\\.");
        String[] b = str2.split("\\.");
        for(int i=0; i<3; i++){
            int tmp1=Integer.parseInt(a[i]), tmp2 = Integer.parseInt(b[i]);
            if(tmp1 > tmp2){
                System.out.println("YES");
                return;
            }
            if(tmp1 < tmp2){
                System.out.println("NO");
                return;
            }
        }
        System.out.println("YES");
    }
}
0