結果

問題 No.264 じゃんけん
ユーザー マサマサ
提出日時 2022-02-10 17:15:42
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 5,000 ms
コード長 821 bytes
コンパイル時間 2,027 ms
コンパイル使用メモリ 72,372 KB
実行使用メモリ 56,240 KB
最終ジャッジ日時 2023-09-08 06:34:23
合計ジャッジ時間 3,903 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
53,684 KB
testcase_01 AC 122 ms
56,240 KB
testcase_02 AC 122 ms
55,916 KB
testcase_03 AC 124 ms
55,808 KB
testcase_04 AC 124 ms
56,052 KB
testcase_05 AC 123 ms
55,672 KB
testcase_06 AC 124 ms
55,788 KB
testcase_07 AC 122 ms
55,696 KB
testcase_08 AC 121 ms
55,832 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();
		// グー(0) チョキ(1) パー(2)
		
		if (n == 0) {
			if (k == 0) {
				System.out.println("Drew");
			} else if (k == 1) {
				System.out.println("Won");
			} else if (k == 2) {
				System.out.println("Lost");
			}
		} else if (n == 1) {
			if (k == 0) {
				System.out.println("Lost");
			} else if (k == 1) {
				System.out.println("Drew");
			} else if (k == 2) {
				System.out.println("Won");
			}
		} else if (n == 2) {
			if (k == 0) {
				System.out.println("Won");
			} else if (k == 1) {
				System.out.println("Lost");
			} else if (k == 2) {
				System.out.println("Drew");
			}
		}
		
		sc.close();
	}
}
0