結果
問題 |
No.63 ポッキーゲーム
|
ユーザー |
|
提出日時 | 2020-08-24 07:58:59 |
言語 | TypeScript (5.7.2) |
結果 |
AC
|
実行時間 | 68 ms / 5,000 ms |
コード長 | 455 bytes |
コンパイル時間 | 8,485 ms |
コンパイル使用メモリ | 228,244 KB |
実行使用メモリ | 39,552 KB |
最終ジャッジ日時 | 2024-12-31 16:18:58 |
合計ジャッジ時間 | 10,817 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
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); // return; // } console.log(Math.floor((pockeyLength - 1) / (oneBite * 2)) * oneBite); } Main(readFileSync('/dev/stdin', 'utf8'));