結果
問題 |
No.63 ポッキーゲーム
|
ユーザー |
|
提出日時 | 2020-08-24 07:51:27 |
言語 | TypeScript (5.7.2) |
結果 |
WA
|
実行時間 | - |
コード長 | 492 bytes |
コンパイル時間 | 7,838 ms |
コンパイル使用メモリ | 229,172 KB |
実行使用メモリ | 41,712 KB |
最終ジャッジ日時 | 2024-12-31 16:19:09 |
合計ジャッジ時間 | 10,184 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 WA * 16 |
ソースコード
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.round(Math.round(pockeyLength / oneBite) / 2); console.log(maxBiteCount * oneBite); } Main(readFileSync('/dev/stdin', 'utf8'));