結果

問題 No.201 yukicoderじゃんけん
ユーザー mobius_bkstmobius_bkst
提出日時 2015-05-03 23:29:53
言語 Java21
(openjdk 21)
結果
AC  
実行時間 104 ms / 5,000 ms
コード長 845 bytes
コンパイル時間 3,411 ms
コンパイル使用メモリ 72,860 KB
実行使用メモリ 54,272 KB
最終ジャッジ日時 2023-09-19 04:11:57
合計ジャッジ時間 5,802 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
49,220 KB
testcase_01 AC 44 ms
49,120 KB
testcase_02 AC 44 ms
49,500 KB
testcase_03 AC 48 ms
49,320 KB
testcase_04 AC 47 ms
49,192 KB
testcase_05 AC 47 ms
49,368 KB
testcase_06 AC 48 ms
49,380 KB
testcase_07 AC 44 ms
49,020 KB
testcase_08 AC 49 ms
49,284 KB
testcase_09 AC 48 ms
49,184 KB
testcase_10 AC 47 ms
49,368 KB
testcase_11 AC 49 ms
47,044 KB
testcase_12 AC 49 ms
49,120 KB
testcase_13 AC 50 ms
49,660 KB
testcase_14 AC 47 ms
49,288 KB
testcase_15 AC 104 ms
52,424 KB
testcase_16 AC 95 ms
54,272 KB
testcase_17 AC 89 ms
52,176 KB
testcase_18 AC 89 ms
52,532 KB
testcase_19 AC 94 ms
52,276 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.math.BigInteger;

public class No201 {

    public static void main(String[] args) {
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(
                    System.in));
            String[] a = br.readLine().split(" ");
            String[] b = br.readLine().split(" ");
            BigInteger PA = new BigInteger(a[1]);
            BigInteger PB = new BigInteger(b[1]);
            if (PA.compareTo(PB) == 1) {
                System.out.println(a[0]);
            } else if (PA.compareTo(PB) == -1) {
                System.out.println(b[0]);
            } else {
                System.out.println(-1);
            }

        } catch (Exception e) {
            System.err.println("Error:" + e.getMessage());
        }
    }

}
0