結果

問題 No.264 じゃんけん
ユーザー yagi2yagi2
提出日時 2017-04-14 00:43:54
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 5,000 ms
コード長 484 bytes
コンパイル時間 2,671 ms
コンパイル使用メモリ 72,224 KB
実行使用メモリ 56,000 KB
最終ジャッジ日時 2023-09-25 16:32:34
合計ジャッジ時間 4,398 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,736 KB
testcase_01 AC 121 ms
55,828 KB
testcase_02 AC 121 ms
56,000 KB
testcase_03 AC 120 ms
55,996 KB
testcase_04 AC 121 ms
55,692 KB
testcase_05 AC 124 ms
53,600 KB
testcase_06 AC 121 ms
55,692 KB
testcase_07 AC 119 ms
55,672 KB
testcase_08 AC 121 ms
55,628 KB
権限があれば一括ダウンロードができます

ソースコード

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