結果

問題 No.201 yukicoderじゃんけん
ユーザー r.suzukir.suzuki
提出日時 2015-12-27 16:31:03
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 592 bytes
コンパイル時間 4,364 ms
コンパイル使用メモリ 74,392 KB
実行使用メモリ 57,976 KB
最終ジャッジ日時 2023-10-19 11:15:19
合計ジャッジ時間 7,147 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 141 ms
57,752 KB
testcase_01 RE -
testcase_02 AC 139 ms
57,600 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

class Yuki {
	String name;
	long yurufuwa;
	String hand;

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

class No_201 {
	public static void main(String[] args) {
		java.util.Scanner sc = new java.util.Scanner(System.in);
		Yuki[] yuki = new Yuki[2];

		for (int i = 0; i < yuki.length; i++) {
			yuki[i] = new Yuki();
			yuki[i].name = sc.next();
			yuki[i].yurufuwa = sc.nextLong();
			yuki[i].hand = sc.next();

		}
		System.out.println(yuki[0].judge(yuki[1]));
		sc.close();
	}
}
0