結果

問題 No.264 じゃんけん
ユーザー 濱田孝治濱田孝治
提出日時 2020-07-30 15:34:03
言語 TypeScript
(5.4.3)
結果
AC  
実行時間 77 ms / 5,000 ms
コード長 643 bytes
コンパイル時間 7,370 ms
コンパイル使用メモリ 252,776 KB
実行使用メモリ 42,428 KB
最終ジャッジ日時 2023-09-17 04:45:48
合計ジャッジ時間 8,387 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

function Main(input) {
  // inputにはすべての入力の文字列が与えられるので必要に応じて input.split("\n") などで分割する。
  var data = input.split("\n");
  var first_line: string = data[0].split(" ");
  var n: number = Number(first_line[0]);
  var k: number = Number(first_line[1]);
  var result: String = "";

  switch (n - k) {
    case 2:
    case -1:
      result = "Won";
      break;
    case 1:
    case -2:
      result = "Lost";
      break;
    case 0:
      result = "Drew";
      break;
  }

  console.log(result);
}
// Don't edit this line!
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
0