結果
問題 | No.63 ポッキーゲーム |
ユーザー |
![]() |
提出日時 | 2021-03-14 02:05:24 |
言語 | TypeScript (5.7.2) |
結果 |
AC
|
実行時間 | 64 ms / 5,000 ms |
コード長 | 350 bytes |
コンパイル時間 | 8,107 ms |
コンパイル使用メモリ | 228,420 KB |
実行使用メモリ | 41,328 KB |
最終ジャッジ日時 | 2024-12-31 16:34:13 |
合計ジャッジ時間 | 10,360 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
import * as fs from 'fs'; const input = fs.readFileSync('/dev/stdin', 'utf8'); const LKarray = input.split(' '); const L = parseInt(LKarray[0]); const K = parseInt(LKarray[1]); let result = Math.floor(L / (2 * K)); let answer = null; if (L % (2 * K) === 0) { answer = K * (result - 1); } else { answer = K * result; } console.log(answer);