結果

問題 No.264 じゃんけん
ユーザー kurobei72kurobei72
提出日時 2018-01-18 21:33:13
言語 Java21
(openjdk 21)
結果
AC  
実行時間 113 ms / 5,000 ms
コード長 833 bytes
コンパイル時間 1,727 ms
コンパイル使用メモリ 71,616 KB
実行使用メモリ 57,928 KB
最終ジャッジ日時 2023-08-25 23:26:49
合計ジャッジ時間 3,478 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 113 ms
56,516 KB
testcase_01 AC 113 ms
55,784 KB
testcase_02 AC 107 ms
57,928 KB
testcase_03 AC 107 ms
56,448 KB
testcase_04 AC 106 ms
53,920 KB
testcase_05 AC 105 ms
56,160 KB
testcase_06 AC 107 ms
56,156 KB
testcase_07 AC 109 ms
56,060 KB
testcase_08 AC 105 ms
55,920 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {
         Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        
        if (a == b)  {
            System.out.println("Drew");
        } else if (a == 0) {
            if (b == 1) {
                System.out.println("Won");
            } else{
                System.out.println("Lost");
            }
        } else if (a == 1) {
            if (b == 0) {
                System.out.println("Lost");
            } else{
                System.out.println("Won");
            }
        } else if (a == 2) {
            if (b == 0) {
                System.out.println("Won");
            } else{
                System.out.println("Lost");
            }
        }
    }
}
0