結果
問題 |
No.63 ポッキーゲーム
|
ユーザー |
|
提出日時 | 2020-08-24 07:52:25 |
言語 | TypeScript (5.7.2) |
結果 |
WA
|
実行時間 | - |
コード長 | 492 bytes |
コンパイル時間 | 8,154 ms |
コンパイル使用メモリ | 228,840 KB |
実行使用メモリ | 41,464 KB |
最終ジャッジ日時 | 2024-12-31 16:18:50 |
合計ジャッジ時間 | 10,053 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 WA * 7 |
ソースコード
import { readFileSync } from 'fs'; function Main(input: string) { const data = input.split('\n'); const firstLine = data[0].split(' ').map(Number); const pockeyLength = firstLine[0]; const oneBite = firstLine[1]; // 一口も食べない if (pockeyLength <= oneBite * 2) { console.log(0); process.exit(); } const maxBiteCount = Math.floor(Math.floor(pockeyLength / oneBite) / 2); console.log(maxBiteCount * oneBite); } Main(readFileSync('/dev/stdin', 'utf8'));