結果

問題 No.264 じゃんけん
ユーザー Hiroaki KonoHiroaki Kono
提出日時 2017-10-26 20:49:05
言語 Java21
(openjdk 21)
結果
AC  
実行時間 139 ms / 5,000 ms
コード長 463 bytes
コンパイル時間 3,986 ms
コンパイル使用メモリ 75,364 KB
実行使用メモリ 54,144 KB
最終ジャッジ日時 2024-05-01 15:15:57
合計ジャッジ時間 5,265 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 135 ms
54,004 KB
testcase_01 AC 138 ms
53,972 KB
testcase_02 AC 136 ms
53,828 KB
testcase_03 AC 137 ms
53,848 KB
testcase_04 AC 137 ms
53,720 KB
testcase_05 AC 139 ms
53,860 KB
testcase_06 AC 138 ms
54,144 KB
testcase_07 AC 138 ms
54,000 KB
testcase_08 AC 138 ms
53,968 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No264 {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int me = s.nextInt();
        int opponent = s.nextInt();
        int diff = me - opponent;
        if (diff == 0) {
            System.out.println("Drew");
        } else if (diff == -1 || diff == 2) {
            System.out.println("Won");
        } else {
            System.out.println("Lost");
        }
    }
}
0