結果

問題 No.201 yukicoderじゃんけん
コンテスト
ユーザー kaoetaya
提出日時 2016-12-01 16:13:51
言語 Java
(openjdk 25.0.2)
コンパイル:
javac -encoding UTF8 _filename_
実行:
java -ea -Xmx700m -Xss256M -DONLINE_JUDGE=true _class_
結果
AC  
実行時間 121 ms / 5,000 ms
コード長 664 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 3,350 ms
コンパイル使用メモリ 86,312 KB
実行使用メモリ 44,760 KB
最終ジャッジ日時 2026-05-21 21:52:59
合計ジャッジ時間 6,325 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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