結果

問題 No.264 じゃんけん
ユーザー 2ch_GreenApple
提出日時 2015-08-16 16:01:29
言語 Java
(openjdk 23)
結果
AC  
実行時間 118 ms / 5,000 ms
コード長 501 bytes
コンパイル時間 2,167 ms
コンパイル使用メモリ 74,868 KB
実行使用メモリ 54,296 KB
最終ジャッジ日時 2024-07-18 09:52:44
合計ジャッジ時間 3,778 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Main {
    //0グー 1チョキ 2パー
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int me = sc.nextInt();
        int you = sc.nextInt();

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

    }
}
0