結果

問題 No.201 yukicoderじゃんけん
ユーザー samplelpmassamplelpmas
提出日時 2016-11-25 12:59:36
言語 Java21
(openjdk 21)
結果
AC  
実行時間 215 ms / 5,000 ms
コード長 694 bytes
コンパイル時間 3,250 ms
コンパイル使用メモリ 74,376 KB
実行使用メモリ 42,192 KB
最終ジャッジ日時 2024-11-27 11:08:51
合計ジャッジ時間 6,123 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
41,004 KB
testcase_01 AC 118 ms
41,484 KB
testcase_02 AC 117 ms
41,016 KB
testcase_03 AC 123 ms
40,924 KB
testcase_04 AC 121 ms
41,192 KB
testcase_05 AC 112 ms
40,144 KB
testcase_06 AC 120 ms
40,600 KB
testcase_07 AC 107 ms
39,992 KB
testcase_08 AC 115 ms
40,184 KB
testcase_09 AC 124 ms
40,604 KB
testcase_10 AC 127 ms
41,052 KB
testcase_11 AC 131 ms
41,260 KB
testcase_12 AC 125 ms
40,864 KB
testcase_13 AC 128 ms
40,988 KB
testcase_14 AC 124 ms
41,204 KB
testcase_15 AC 180 ms
41,308 KB
testcase_16 AC 195 ms
41,560 KB
testcase_17 AC 215 ms
42,192 KB
testcase_18 AC 171 ms
41,452 KB
testcase_19 AC 194 ms
42,008 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 nameA = sc.next();
        BigInteger yurufuwaPoingA = sc.nextBigInteger();
        sc.next();

        String nameB = sc.next();
        BigInteger yurufuwaPoingB = sc.nextBigInteger();
        sc.next();

        if (yurufuwaPoingA.compareTo(yurufuwaPoingB) == 0) {
            System.out.println(-1);
            return;
        }

        if (yurufuwaPoingA.compareTo(yurufuwaPoingB) > 0) {
            System.out.println(nameA);
        } else {
            System.out.println(nameB);
        }

    }

}
0