結果

問題 No.201 yukicoderじゃんけん
ユーザー yagi2yagi2
提出日時 2017-04-21 16:47:12
言語 Java21
(openjdk 21)
結果
AC  
実行時間 174 ms / 5,000 ms
コード長 538 bytes
コンパイル時間 2,256 ms
コンパイル使用メモリ 71,540 KB
実行使用メモリ 57,012 KB
最終ジャッジ日時 2023-09-27 10:57:27
合計ジャッジ時間 5,701 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 105 ms
55,736 KB
testcase_01 AC 107 ms
56,072 KB
testcase_02 AC 109 ms
55,912 KB
testcase_03 AC 115 ms
55,776 KB
testcase_04 AC 112 ms
56,076 KB
testcase_05 AC 111 ms
55,988 KB
testcase_06 AC 110 ms
56,052 KB
testcase_07 AC 106 ms
55,688 KB
testcase_08 AC 113 ms
55,924 KB
testcase_09 AC 111 ms
56,104 KB
testcase_10 AC 110 ms
56,176 KB
testcase_11 AC 113 ms
55,948 KB
testcase_12 AC 116 ms
53,844 KB
testcase_13 AC 111 ms
56,076 KB
testcase_14 AC 112 ms
55,784 KB
testcase_15 AC 159 ms
56,580 KB
testcase_16 AC 159 ms
56,020 KB
testcase_17 AC 165 ms
57,012 KB
testcase_18 AC 174 ms
56,460 KB
testcase_19 AC 169 ms
56,284 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.math.BigInteger;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String A = sc.next();
        BigInteger AP = new BigInteger(sc.next());

        sc.next();

        String B = sc.next();
        BigInteger BP = new BigInteger(sc.next());

        if (AP.compareTo(BP) == 0) System.out.println("-1");
        if (AP.compareTo(BP) == -1)  System.out.println(B);
        if (AP.compareTo(BP) == 1) System.out.println(A);
    }
}
0