結果

問題 No.264 じゃんけん
ユーザー 2ch_GreenApple2ch_GreenApple
提出日時 2015-08-16 16:01:29
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 5,000 ms
コード長 501 bytes
コンパイル時間 4,508 ms
コンパイル使用メモリ 70,904 KB
実行使用メモリ 56,224 KB
最終ジャッジ日時 2023-09-25 12:24:17
合計ジャッジ時間 5,881 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
56,000 KB
testcase_01 AC 127 ms
55,992 KB
testcase_02 AC 128 ms
55,480 KB
testcase_03 AC 126 ms
56,208 KB
testcase_04 AC 128 ms
55,524 KB
testcase_05 AC 127 ms
55,724 KB
testcase_06 AC 127 ms
55,916 KB
testcase_07 AC 126 ms
56,224 KB
testcase_08 AC 127 ms
55,860 KB
権限があれば一括ダウンロードができます

ソースコード

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