結果

問題 No.63 ポッキーゲーム
ユーザー jcm_2jcm_2
提出日時 2019-08-12 22:05:15
言語 JavaScript
(node v23.5.0)
結果
AC  
実行時間 64 ms / 5,000 ms
コード長 327 bytes
コンパイル時間 28 ms
コンパイル使用メモリ 6,688 KB
実行使用メモリ 39,552 KB
最終ジャッジ日時 2024-10-13 01:20:30
合計ジャッジ時間 2,087 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

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 = Math.floor(L / (2 * K)) * K
  if (L - result * 2 === 0) result -= K
  console.log(result)
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"))
0