結果
問題 | No.63 ポッキーゲーム |
ユーザー |
![]() |
提出日時 | 2015-08-26 15:57:04 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 389 bytes |
コンパイル時間 | 517 ms |
コンパイル使用メモリ | 64,408 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-24 04:54:19 |
合計ジャッジ時間 | 1,168 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
#include <iostream>#include <numeric>#include <algorithm>#include <string>#include <vector>#include <cmath>#define rep(i, a) FOR(i, 0, a)#define FOR(i, a, b) for(int i = a; i < b; ++i)int l, k;int main(){std::cin >> l >> k;int n = std::ceil((double)l / k);if (n % 2 == 0)std::cout << k * (n / 2 - 1) << std::endl;else std::cout << k * (n / 2) << std::endl;return 0;}