結果

問題 No.63 ポッキーゲーム
ユーザー jcm_2jcm_2
提出日時 2019-08-12 21:55:34
言語 JavaScript
(node v21.7.1)
結果
AC  
実行時間 776 ms / 5,000 ms
コード長 322 bytes
コンパイル時間 40 ms
コンパイル使用メモリ 6,812 KB
実行使用メモリ 42,368 KB
最終ジャッジ日時 2024-04-21 02:57:11
合計ジャッジ時間 4,598 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
38,784 KB
testcase_01 AC 59 ms
38,656 KB
testcase_02 AC 57 ms
38,656 KB
testcase_03 AC 58 ms
38,912 KB
testcase_04 AC 55 ms
38,656 KB
testcase_05 AC 56 ms
38,656 KB
testcase_06 AC 55 ms
38,528 KB
testcase_07 AC 59 ms
41,984 KB
testcase_08 AC 61 ms
42,368 KB
testcase_09 AC 61 ms
41,984 KB
testcase_10 AC 70 ms
42,112 KB
testcase_11 AC 771 ms
42,112 KB
testcase_12 AC 80 ms
42,112 KB
testcase_13 AC 776 ms
42,112 KB
testcase_14 AC 84 ms
42,112 KB
testcase_15 AC 78 ms
42,240 KB
testcase_16 AC 64 ms
42,112 KB
testcase_17 AC 744 ms
42,112 KB
testcase_18 AC 69 ms
41,984 KB
testcase_19 AC 199 ms
42,368 KB
testcase_20 AC 76 ms
41,856 KB
testcase_21 AC 103 ms
41,984 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

function Main(input) {
  const data = input.trim().split("\n")
  const first_line = data[0].split(" ")
  let L = parseInt(first_line[0]), K = parseInt(first_line[1])
  let result = 0
  while (0 < L - 2 * K) {
    result += K
    L -= 2 * K
  }
  console.log(result)
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"))
0