結果

問題 No.264 じゃんけん
ユーザー RyanakRyanak
提出日時 2017-09-07 21:51:35
言語 Java21
(openjdk 21)
結果
AC  
実行時間 137 ms / 5,000 ms
コード長 937 bytes
コンパイル時間 2,090 ms
コンパイル使用メモリ 74,888 KB
実行使用メモリ 54,308 KB
最終ジャッジ日時 2024-04-25 01:48:44
合計ジャッジ時間 3,988 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 136 ms
53,908 KB
testcase_01 AC 137 ms
54,308 KB
testcase_02 AC 137 ms
54,140 KB
testcase_03 AC 134 ms
54,284 KB
testcase_04 AC 136 ms
54,184 KB
testcase_05 AC 136 ms
54,044 KB
testcase_06 AC 135 ms
54,028 KB
testcase_07 AC 137 ms
54,000 KB
testcase_08 AC 136 ms
53,884 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int y=sc.nextInt();
        int x=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