結果

問題 No.264 じゃんけん
ユーザー dazydazy
提出日時 2016-09-01 22:00:41
言語 Java21
(openjdk 21)
結果
AC  
実行時間 114 ms / 5,000 ms
コード長 552 bytes
コンパイル時間 1,817 ms
コンパイル使用メモリ 74,200 KB
実行使用メモリ 41,256 KB
最終ジャッジ日時 2024-04-27 14:28:34
合計ジャッジ時間 3,599 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
41,204 KB
testcase_01 AC 114 ms
41,112 KB
testcase_02 AC 97 ms
39,652 KB
testcase_03 AC 95 ms
39,788 KB
testcase_04 AC 109 ms
41,060 KB
testcase_05 AC 109 ms
40,828 KB
testcase_06 AC 102 ms
40,004 KB
testcase_07 AC 114 ms
41,256 KB
testcase_08 AC 113 ms
41,236 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Yukicoder {
    static public void main(String[] args) {
        int my,you;
        Scanner scanner = new Scanner(System.in);

        my = scanner.nextInt();
        you = scanner.nextInt();

        if (my == you) System.out.println("Drew");
        else if (you - my > 0) {
            if (my + 1 == you) System.out.println("Won");
            else System.out.println("Lost");
        } else {
            if (you + 1 == my) System.out.println("Lost");
            else System.out.println("Won");
        }
    }
}
0