結果

問題 No.264 じゃんけん
ユーザー samplelpmas
提出日時 2016-12-14 15:58:00
言語 Java
(openjdk 23)
結果
AC  
実行時間 136 ms / 5,000 ms
コード長 482 bytes
コンパイル時間 3,818 ms
コンパイル使用メモリ 74,548 KB
実行使用メモリ 54,492 KB
最終ジャッジ日時 2024-11-30 07:22:44
合計ジャッジ時間 4,076 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

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