結果

問題 No.264 じゃんけん
ユーザー swyroakswyroak
提出日時 2021-08-02 00:02:06
言語 JavaScript
(node v21.7.1)
結果
AC  
実行時間 77 ms / 5,000 ms
コード長 955 bytes
コンパイル時間 29 ms
コンパイル使用メモリ 5,156 KB
実行使用メモリ 42,272 KB
最終ジャッジ日時 2023-10-14 19:05:46
合計ジャッジ時間 1,596 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
42,136 KB
testcase_01 AC 77 ms
42,252 KB
testcase_02 AC 73 ms
41,980 KB
testcase_03 AC 73 ms
42,248 KB
testcase_04 AC 73 ms
42,272 KB
testcase_05 AC 72 ms
42,164 KB
testcase_06 AC 73 ms
42,020 KB
testcase_07 AC 71 ms
42,104 KB
testcase_08 AC 73 ms
42,076 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

"use strict";
function Main(input) {
    let MyHand;
    let OtHand;
    [MyHand, OtHand] = input.split(" ").map(i => Number(i));
    if (MyHand === OtHand) {
        console.log("Drew");
    }
    else {
        if (MyHand === 0) {
            if (OtHand === 1) {
                console.log("Won");
            }
            else {
                console.log("Lost");
            }
        }
        else if (MyHand === 1) {
            if (OtHand === 2) {
                console.log("Won");
            }
            else {
                console.log("Lost");
            }
        }
        else if (MyHand === 2) {
            if (OtHand === 0) {
                console.log("Won");
            }
            else {
                console.log("Lost");
            }
        }
    }
}
//テストの入力を受け取る
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//# sourceMappingURL=index.js.map
0