結果

問題 No.264 じゃんけん
ユーザー ikawaiikawai
提出日時 2023-09-04 11:04:36
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 5,000 ms
コード長 795 bytes
コンパイル時間 2,237 ms
コンパイル使用メモリ 71,540 KB
実行使用メモリ 55,920 KB
最終ジャッジ日時 2023-09-04 11:04:45
合計ジャッジ時間 4,347 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,524 KB
testcase_01 AC 122 ms
55,724 KB
testcase_02 AC 123 ms
55,476 KB
testcase_03 AC 124 ms
55,500 KB
testcase_04 AC 123 ms
55,824 KB
testcase_05 AC 123 ms
55,920 KB
testcase_06 AC 124 ms
55,664 KB
testcase_07 AC 123 ms
53,724 KB
testcase_08 AC 129 ms
53,500 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
class Wandbox
{
    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 == 0) {
    			System.out.println("Drew");
    		} else if (k == 1) {
    			System.out.println("Won");
    		} else {
    			System.out.println("Lost");
    		}
    	} else if (n == 1) {
    		if (k == 0) {
    			System.out.println("Lost");
    		} else if (k == 1) {
    			System.out.println("Drew");
    		} else {
    			System.out.println("Won");
    		}
    	} else {
    		if (k == 0) {
    			System.out.println("Won");
    		} else if (k == 1) {
    			System.out.println("Lost");
    		} else {
    			System.out.println("Drew");
    		}
    	}
    	
    }
}
0