結果

問題 No.264 じゃんけん
ユーザー n_gojon_gojo
提出日時 2020-04-09 11:14:26
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 5,000 ms
コード長 676 bytes
コンパイル時間 3,342 ms
コンパイル使用メモリ 71,540 KB
実行使用メモリ 56,156 KB
最終ジャッジ日時 2023-09-29 12:36:46
合計ジャッジ時間 5,773 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,808 KB
testcase_01 AC 120 ms
55,804 KB
testcase_02 AC 120 ms
54,872 KB
testcase_03 AC 125 ms
55,716 KB
testcase_04 AC 122 ms
56,156 KB
testcase_05 AC 120 ms
55,796 KB
testcase_06 AC 119 ms
55,768 KB
testcase_07 AC 120 ms
55,800 KB
testcase_08 AC 122 ms
55,492 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No264 {
    public static void main(String[] args) {
        // 標準入力から読み込む際に、Scannerオブジェクトを使う。
        Scanner sc = new Scanner(System.in);

        // int 1つ分を読み込む
        int a = sc.nextInt();
        int b = sc.nextInt();
        int check = a - b;
        String ans;
        switch (check) {
            case 0:
                ans = "Drew";
                break;
            case 2:
            case -1:
                ans = "Won";
                break;
            default:
                ans = "Lost";
        }
        
        System.out.println(ans);
    }
}
0