結果

問題 No.201 yukicoderじゃんけん
ユーザー r.suzuki
提出日時 2015-12-27 17:04:46
言語 Java
(openjdk 23)
結果
AC  
実行時間 190 ms / 5,000 ms
コード長 658 bytes
コンパイル時間 1,864 ms
コンパイル使用メモリ 75,212 KB
実行使用メモリ 54,672 KB
最終ジャッジ日時 2024-09-19 07:24:49
合計ジャッジ時間 5,378 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.math.BigInteger;

class Yuki {
	String name;
	BigInteger yurufuwa;
	String hand;
	
	Yuki(String s1,BigInteger b,String s2){
		this.name = s1;
		this.yurufuwa = b;
		this.hand = s2;
	}

	String judge(Yuki y) {
		int i = this.yurufuwa.compareTo(y.yurufuwa);
		if (i == 0) {
			return "-1";
		} else {
			return i > 0 ? this.name : y.name;
		}
	}
}

class No_201 {
	public static void main(String[] args) {
		java.util.Scanner sc = new java.util.Scanner(System.in);
		Yuki y1 = new Yuki(sc.next(),sc.nextBigInteger(),sc.next());
		Yuki y2 = new Yuki(sc.next(),sc.nextBigInteger(),sc.next());
		
		System.out.println(y1.judge(y2));
		sc.close();
	}
}
0