結果

問題 No.264 じゃんけん
ユーザー veroomveroom
提出日時 2016-10-10 12:17:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 5,000 ms
コード長 524 bytes
コンパイル時間 4,719 ms
コンパイル使用メモリ 72,280 KB
実行使用メモリ 56,176 KB
最終ジャッジ日時 2023-08-14 06:07:54
合計ジャッジ時間 6,556 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,504 KB
testcase_01 AC 120 ms
55,784 KB
testcase_02 AC 121 ms
55,472 KB
testcase_03 AC 120 ms
55,692 KB
testcase_04 AC 121 ms
56,176 KB
testcase_05 AC 120 ms
56,140 KB
testcase_06 AC 123 ms
55,712 KB
testcase_07 AC 122 ms
55,620 KB
testcase_08 AC 121 ms
53,688 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.util.Scanner;

public class Yukicoder {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int you = sc.nextInt();
		int opponent = sc.nextInt();

		if (you == 0 && opponent == 2) {
			System.out.println("Lost");
		}else if (you == 2 && opponent == 0) {
			System.out.println("Won");
		} else if (you < opponent) {
			System.out.println("Won");
		} else if (you == opponent) {
			System.out.println("Drew");
		} else {
			System.out.println("Lost");
		}
	}
}
0