結果

問題 No.138 化石のバージョン
ユーザー t8m8⛄️t8m8⛄️
提出日時 2015-03-10 19:00:34
言語 Java21
(openjdk 21)
結果
AC  
実行時間 47 ms / 5,000 ms
コード長 1,151 bytes
コンパイル時間 3,706 ms
コンパイル使用メモリ 74,964 KB
実行使用メモリ 49,744 KB
最終ジャッジ日時 2023-08-28 13:19:00
合計ジャッジ時間 6,891 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
49,552 KB
testcase_01 AC 45 ms
49,304 KB
testcase_02 AC 44 ms
49,560 KB
testcase_03 AC 46 ms
49,276 KB
testcase_04 AC 44 ms
49,272 KB
testcase_05 AC 45 ms
49,484 KB
testcase_06 AC 43 ms
49,328 KB
testcase_07 AC 44 ms
49,480 KB
testcase_08 AC 44 ms
49,124 KB
testcase_09 AC 44 ms
49,392 KB
testcase_10 AC 45 ms
49,468 KB
testcase_11 AC 43 ms
47,504 KB
testcase_12 AC 44 ms
49,348 KB
testcase_13 AC 43 ms
49,652 KB
testcase_14 AC 45 ms
49,284 KB
testcase_15 AC 45 ms
49,276 KB
testcase_16 AC 45 ms
49,564 KB
testcase_17 AC 45 ms
49,744 KB
testcase_18 AC 44 ms
49,308 KB
testcase_19 AC 44 ms
49,564 KB
testcase_20 AC 44 ms
49,432 KB
testcase_21 AC 44 ms
49,124 KB
testcase_22 AC 47 ms
49,252 KB
testcase_23 AC 45 ms
49,324 KB
testcase_24 AC 44 ms
47,544 KB
testcase_25 AC 44 ms
49,508 KB
testcase_26 AC 46 ms
49,640 KB
testcase_27 AC 45 ms
49,312 KB
testcase_28 AC 45 ms
49,316 KB
testcase_29 AC 45 ms
49,472 KB
testcase_30 AC 46 ms
49,124 KB
testcase_31 AC 45 ms
49,140 KB
testcase_32 AC 46 ms
49,548 KB
testcase_33 AC 46 ms
49,324 KB
testcase_34 AC 45 ms
49,468 KB
testcase_35 AC 45 ms
49,616 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

//No.138 化石のバージョン

import java.util.*;
import java.io.*;
import static java.util.Arrays.*;
import static java.lang.Math.*;

public class No138 {

    static final InputStream in = System.in;
    static final PrintWriter out = new PrintWriter(System.out,false);

    static void solve() throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String a = br.readLine();
        String b = br.readLine();
        String[] v1 = a.split("\\.");
        String[] v2 = b.split("\\.");
        int dig = 1;
        int n1 = 0, n2 = 0;
        for (int i=2; i>=0; i--) {
            n1 += dig*Integer.parseInt(v1[i]);
            n2 += dig*Integer.parseInt(v2[i]);
            dig *= 1000;
        }

        out.println(n1 >= n2 ? "YES" : "NO");
    }

    public static void main(String[] args) throws Exception {
        long start = System.currentTimeMillis();

        solve();
        out.flush();

        long end = System.currentTimeMillis();
        //trace(end-start + "ms");
        in.close();
    }

    static void trace(Object... o) { System.out.println(deepToString(o));}
}
0