結果

問題 No.264 じゃんけん
ユーザー f Oxf Ox
提出日時 2021-04-13 15:44:06
言語 JavaScript
(node v21.7.1)
結果
AC  
実行時間 77 ms / 5,000 ms
コード長 450 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 5,212 KB
実行使用メモリ 42,296 KB
最終ジャッジ日時 2023-09-12 07:45:28
合計ジャッジ時間 2,582 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
42,156 KB
testcase_01 AC 76 ms
42,108 KB
testcase_02 AC 75 ms
42,096 KB
testcase_03 AC 77 ms
42,184 KB
testcase_04 AC 77 ms
42,124 KB
testcase_05 AC 76 ms
42,228 KB
testcase_06 AC 75 ms
42,296 KB
testcase_07 AC 76 ms
42,096 KB
testcase_08 AC 77 ms
42,228 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

function Main(input) {
  const datas = input.split(" ");
  const data = datas.map(Number);

  if ((data[0]===0 && data[1]===1) || (data[0]===1 && data[1]===2) || (data[0]===2 && data[1]===0)) {
    console.log("Won");
  } else if ((data[0]===0 && data[1]===2) || (data[0]===1 && data[1]===0) || (data[0]===2 && data[1]===1)) {
    console.log("Lost");
  } else  {
    console.log("Drew");
  }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
0