結果

問題 No.264 じゃんけん
ユーザー mahnamahna
提出日時 2022-06-14 15:13:53
言語 JavaScript
(node v21.7.1)
結果
AC  
実行時間 65 ms / 5,000 ms
コード長 411 bytes
コンパイル時間 72 ms
コンパイル使用メモリ 6,940 KB
実行使用メモリ 39,040 KB
最終ジャッジ日時 2024-04-10 08:59:09
合計ジャッジ時間 3,282 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
38,784 KB
testcase_01 AC 65 ms
38,656 KB
testcase_02 AC 63 ms
38,912 KB
testcase_03 AC 63 ms
38,784 KB
testcase_04 AC 64 ms
38,784 KB
testcase_05 AC 63 ms
38,912 KB
testcase_06 AC 63 ms
39,040 KB
testcase_07 AC 63 ms
38,912 KB
testcase_08 AC 64 ms
39,040 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

const fs = require("fs");
const input = fs.readFileSync("/dev/stdin", "utf-8").trim();
const lines = input.split("\n");

const word = lines[0];

if (word === "0 0" || word === "1 1" || word === "2 2") {
    console.log("Drew");
} else if (word === "0 1" || word === "1 2" || word === "2 0") {
    console.log("Won");
} else if (word === "1 0" || word === "2 1" || word === "0 2") {
    console.log("Lost");
}


0