結果

問題 No.201 yukicoderじゃんけん
ユーザー samplelpmassamplelpmas
提出日時 2016-11-25 12:59:36
言語 Java21
(openjdk 21)
結果
AC  
実行時間 197 ms / 5,000 ms
コード長 694 bytes
コンパイル時間 3,578 ms
コンパイル使用メモリ 72,008 KB
実行使用メモリ 57,728 KB
最終ジャッジ日時 2023-08-18 07:29:00
合計ジャッジ時間 5,764 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 113 ms
56,284 KB
testcase_01 AC 115 ms
55,732 KB
testcase_02 AC 111 ms
55,460 KB
testcase_03 AC 120 ms
55,796 KB
testcase_04 AC 120 ms
55,820 KB
testcase_05 AC 122 ms
55,832 KB
testcase_06 AC 120 ms
57,728 KB
testcase_07 AC 116 ms
56,328 KB
testcase_08 AC 127 ms
56,264 KB
testcase_09 AC 126 ms
53,404 KB
testcase_10 AC 120 ms
55,956 KB
testcase_11 AC 123 ms
56,544 KB
testcase_12 AC 122 ms
56,076 KB
testcase_13 AC 128 ms
54,020 KB
testcase_14 AC 121 ms
56,332 KB
testcase_15 AC 195 ms
56,824 KB
testcase_16 AC 185 ms
56,576 KB
testcase_17 AC 190 ms
56,432 KB
testcase_18 AC 197 ms
56,312 KB
testcase_19 AC 197 ms
56,876 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