結果
問題 |
No.63 ポッキーゲーム
|
ユーザー |
|
提出日時 | 2020-08-23 22:07:46 |
言語 | TypeScript (5.7.2) |
結果 |
WA
|
実行時間 | - |
コード長 | 492 bytes |
コンパイル時間 | 7,828 ms |
コンパイル使用メモリ | 228,464 KB |
実行使用メモリ | 41,588 KB |
最終ジャッジ日時 | 2024-12-31 16:18:46 |
合計ジャッジ時間 | 10,101 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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'));