結果

問題 No.264 じゃんけん
ユーザー samplelpmassamplelpmas
提出日時 2016-12-14 15:58:00
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 5,000 ms
コード長 482 bytes
コンパイル時間 2,820 ms
コンパイル使用メモリ 71,600 KB
実行使用メモリ 56,332 KB
最終ジャッジ日時 2023-08-20 06:42:35
合計ジャッジ時間 4,838 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,760 KB
testcase_01 AC 122 ms
55,876 KB
testcase_02 AC 123 ms
55,752 KB
testcase_03 AC 123 ms
55,800 KB
testcase_04 AC 122 ms
55,768 KB
testcase_05 AC 122 ms
56,028 KB
testcase_06 AC 123 ms
56,084 KB
testcase_07 AC 123 ms
55,636 KB
testcase_08 AC 123 ms
56,332 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int player1 = sc.nextInt();
        int player2 = sc.nextInt();

        if (player1 == player2) {
            System.out.println("Drew");
            return;
        }

        if ((player1 - player2 + 3) % 3 == 1) {
            System.out.println("Lost");
        } else {
            System.out.println("Won");
        }

    }

}
0