結果

問題 No.201 yukicoderじゃんけん
ユーザー kaoetayakaoetaya
提出日時 2016-12-01 16:13:51
言語 Java
(openjdk 23)
結果
AC  
実行時間 209 ms / 5,000 ms
コード長 664 bytes
コンパイル時間 2,818 ms
コンパイル使用メモリ 74,496 KB
実行使用メモリ 43,544 KB
最終ジャッジ日時 2024-11-27 15:52:05
合計ジャッジ時間 6,485 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

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