結果

問題 No.264 じゃんけん
ユーザー yagi2
提出日時 2017-04-14 00:43:54
言語 Java
(openjdk 23)
結果
AC  
実行時間 115 ms / 5,000 ms
コード長 484 bytes
コンパイル時間 1,932 ms
コンパイル使用メモリ 75,112 KB
実行使用メモリ 54,112 KB
最終ジャッジ日時 2024-07-18 13:01:05
合計ジャッジ時間 3,244 ms
ジャッジサーバーID
(参考情報)
judge1 / 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 me = Integer.parseInt(sc.next());
        int cpu = Integer.parseInt(sc.next());

        if (me == cpu) {
            System.out.println("Drew");
        }
        if (cpu == (me + 1) % 3) {
            System.out.println("Won");
        }
        if (me == (cpu + 1) % 3) {
            System.out.println("Lost");
        }
    }
}
0