結果

問題 No.201 yukicoderじゃんけん
ユーザー koukonkokoukonko
提出日時 2015-12-15 15:23:11
言語 Java21
(openjdk 21)
結果
AC  
実行時間 93 ms / 5,000 ms
コード長 717 bytes
コンパイル時間 3,986 ms
コンパイル使用メモリ 71,704 KB
実行使用メモリ 52,792 KB
最終ジャッジ日時 2023-10-13 17:08:09
合計ジャッジ時間 5,142 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
49,432 KB
testcase_01 AC 38 ms
49,180 KB
testcase_02 AC 39 ms
49,328 KB
testcase_03 AC 43 ms
49,276 KB
testcase_04 AC 41 ms
49,300 KB
testcase_05 AC 40 ms
49,348 KB
testcase_06 AC 41 ms
49,292 KB
testcase_07 AC 38 ms
49,332 KB
testcase_08 AC 42 ms
49,464 KB
testcase_09 AC 43 ms
49,412 KB
testcase_10 AC 41 ms
49,280 KB
testcase_11 AC 42 ms
49,268 KB
testcase_12 AC 42 ms
49,336 KB
testcase_13 AC 44 ms
49,292 KB
testcase_14 AC 43 ms
49,260 KB
testcase_15 AC 87 ms
52,400 KB
testcase_16 AC 81 ms
52,200 KB
testcase_17 AC 93 ms
52,516 KB
testcase_18 AC 82 ms
52,792 KB
testcase_19 AC 93 ms
52,652 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

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

public class Main {
	public static void main(String[] args) {
		BufferedReader read = new BufferedReader(new InputStreamReader(System.in));
		try {
			String[] firBox = read.readLine().split(" ");
			String[] secBox = read.readLine().split(" ");

			BigInteger first = new BigInteger(firBox[1]);
			BigInteger second = new BigInteger(secBox[1]);

			if (first.equals(second)) {
				System.out.println(-1);
			} else if (first.max(second).equals(first)) {
				System.out.println(firBox[0]);
			} else {
				System.out.println(secBox[0]);
			}

		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
0