結果

問題 No.201 yukicoderじゃんけん
ユーザー thorikawathorikawa
提出日時 2015-05-03 23:24:25
言語 Java21
(openjdk 21)
結果
AC  
実行時間 188 ms / 5,000 ms
コード長 667 bytes
コンパイル時間 2,923 ms
コンパイル使用メモリ 71,012 KB
実行使用メモリ 56,224 KB
最終ジャッジ日時 2023-09-19 03:30:08
合計ジャッジ時間 7,034 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,888 KB
testcase_01 AC 122 ms
55,596 KB
testcase_02 AC 121 ms
55,692 KB
testcase_03 AC 129 ms
55,584 KB
testcase_04 AC 128 ms
55,600 KB
testcase_05 AC 126 ms
55,828 KB
testcase_06 AC 126 ms
55,600 KB
testcase_07 AC 123 ms
55,620 KB
testcase_08 AC 134 ms
55,680 KB
testcase_09 AC 128 ms
55,732 KB
testcase_10 AC 126 ms
55,520 KB
testcase_11 AC 129 ms
55,860 KB
testcase_12 AC 128 ms
55,976 KB
testcase_13 AC 127 ms
55,480 KB
testcase_14 AC 127 ms
55,700 KB
testcase_15 AC 182 ms
55,484 KB
testcase_16 AC 183 ms
56,128 KB
testcase_17 AC 186 ms
56,216 KB
testcase_18 AC 188 ms
56,224 KB
testcase_19 AC 186 ms
55,864 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

public class Main {
    public static void main(String[] argv) {
        Scanner scanner = new Scanner(System.in);
        String name1, name2;
        BigInteger p1, p2;
        name1 = scanner.next();
        p1 = new BigInteger(scanner.next());
        scanner.next();
        name2 = scanner.next();
        p2 = new BigInteger(scanner.next());
        scanner.next();
        int res = p1.compareTo(p2);
        if (res > 0) {
            System.out.println(name1);
        } else if (res < 0) {
            System.out.println(name2);
        } else {
            System.out.println(-1);
        }
    }
}
0