結果

問題 No.201 yukicoderじゃんけん
ユーザー kaoetayakaoetaya
提出日時 2016-12-01 16:13:51
言語 Java21
(openjdk 21)
結果
AC  
実行時間 195 ms / 5,000 ms
コード長 664 bytes
コンパイル時間 2,958 ms
コンパイル使用メモリ 72,632 KB
実行使用メモリ 56,668 KB
最終ジャッジ日時 2023-08-18 11:21:57
合計ジャッジ時間 6,686 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
56,092 KB
testcase_01 AC 113 ms
55,656 KB
testcase_02 AC 113 ms
53,604 KB
testcase_03 AC 123 ms
55,804 KB
testcase_04 AC 121 ms
56,116 KB
testcase_05 AC 122 ms
55,848 KB
testcase_06 AC 116 ms
55,780 KB
testcase_07 AC 115 ms
55,984 KB
testcase_08 AC 125 ms
55,828 KB
testcase_09 AC 125 ms
56,260 KB
testcase_10 AC 118 ms
55,880 KB
testcase_11 AC 120 ms
55,828 KB
testcase_12 AC 128 ms
56,160 KB
testcase_13 AC 128 ms
55,892 KB
testcase_14 AC 121 ms
55,780 KB
testcase_15 AC 188 ms
55,848 KB
testcase_16 AC 192 ms
56,332 KB
testcase_17 AC 188 ms
56,668 KB
testcase_18 AC 190 ms
56,040 KB
testcase_19 AC 195 ms
56,224 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.math.*;

class Human{
	String name;
	BigInteger point;
	String hands;
}

public class pre {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
		Human a = new Human();
		a.name = s.next();
		a.point = s.nextBigInteger();
		a.hands = s.next();
		Human b = new Human();
		b.name = s.next();
		b.point = s.nextBigInteger();
		b.hands = s.next();
		
		switch(a.point.compareTo(b.point)){
			case -1:
				System.out.println(b.name);
				break;
				
			case 0:
				System.out.println("-1");
				break;
				
			case 1:
				System.out.println(a.name);
				break;
				
			default:
				break;
		}
    }
}
0