結果

問題 No.264 じゃんけん
ユーザー kurobei72
提出日時 2018-01-18 21:33:13
言語 Java
(openjdk 23)
結果
AC  
実行時間 130 ms / 5,000 ms
コード長 833 bytes
コンパイル時間 2,514 ms
コンパイル使用メモリ 74,412 KB
実行使用メモリ 41,676 KB
最終ジャッジ日時 2024-12-24 11:25:59
合計ジャッジ時間 3,722 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

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