結果

問題 No.264 じゃんけん
ユーザー RyanakRyanak
提出日時 2017-09-07 21:49:35
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 937 bytes
コンパイル時間 1,871 ms
コンパイル使用メモリ 74,136 KB
実行使用メモリ 41,612 KB
最終ジャッジ日時 2024-04-25 01:48:06
合計ジャッジ時間 3,384 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 101 ms
40,336 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 103 ms
39,780 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 110 ms
41,296 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x=sc.nextInt();
        int y=sc.nextInt();

        if (y == 0) {
            if (x == 0)
                System.out.println("Drew");
            else if(x == 1)
                System.out.println("Won");
            else if(x == 2)
                System.out.println("Lost");
        }
        else if (y == 1){
            if (x == 0)
                System.out.println("Lost");
            else if(x == 1)
                System.out.println("Drew");
            else if(x == 2)
                System.out.println("Won");
        }
        else if (y == 2){
            if (x == 0)
                System.out.println("Won");
            else if(x == 1)
                System.out.println("Lost");
            else if(x == 2)
                System.out.println("Drew");
        }
    }
}
0