結果

問題 No.264 じゃんけん
ユーザー gomagoma
提出日時 2017-09-14 21:56:46
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 707 bytes
コンパイル時間 2,322 ms
コンパイル使用メモリ 74,516 KB
実行使用メモリ 41,536 KB
最終ジャッジ日時 2024-04-25 09:28:19
合計ジャッジ時間 4,279 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 142 ms
41,252 KB
testcase_01 AC 141 ms
41,088 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 146 ms
41,256 KB
testcase_05 AC 142 ms
41,240 KB
testcase_06 AC 142 ms
41,312 KB
testcase_07 WA -
testcase_08 AC 127 ms
39,864 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		if (n == 0) {
			if (k == 1) {
				System.out.println("Won");
			} else if (n == k) {
				System.out.println("Drew");
			} else {
				System.out.println("Lose");
			}
		} else if (n == 1) {
			if (k == 2) {
				System.out.println("Won");
			} else if (n == k) {
				System.out.println("Drew");
			} else {
				System.out.println("Lose");
			}
		} else if (n == 2) {
			if (k == 0) {
				System.out.println("Won");
			} else if (n == k) {
				System.out.println("Drew");
			} else {
				System.out.println("Lose");
			}
		}

	}
}
0