結果

問題 No.264 じゃんけん
ユーザー face4face4
提出日時 2018-04-09 17:39:37
言語 Java21
(openjdk 21)
結果
AC  
実行時間 43 ms / 5,000 ms
コード長 647 bytes
コンパイル時間 1,933 ms
コンパイル使用メモリ 72,204 KB
実行使用メモリ 49,752 KB
最終ジャッジ日時 2023-09-09 03:28:31
合計ジャッジ時間 2,960 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
49,752 KB
testcase_01 AC 43 ms
49,428 KB
testcase_02 AC 43 ms
47,208 KB
testcase_03 AC 42 ms
49,208 KB
testcase_04 AC 41 ms
49,236 KB
testcase_05 AC 40 ms
47,476 KB
testcase_06 AC 42 ms
49,416 KB
testcase_07 AC 42 ms
47,460 KB
testcase_08 AC 41 ms
49,496 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;

class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] input = br.readLine().split(" ");

        int result = Integer.parseInt(input[0]) - Integer.parseInt(input[1]);

        if (result == 0) {
            System.out.println("Drew");
        } else if (result == 1 || result == -2) {
            System.out.println("Lost");
        } else if (result == 2 || result == -1) {
            System.out.println("Won");
        }
    }
}
0