結果
問題 |
No.63 ポッキーゲーム
|
ユーザー |
|
提出日時 | 2015-02-12 19:56:29 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 303 bytes |
コンパイル時間 | 483 ms |
コンパイル使用メモリ | 58,620 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-23 19:14:52 |
合計ジャッジ時間 | 1,842 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 8 WA * 14 |
ソースコード
#include <iostream> #include <cstdio> #include <vector> #include <algorithm> #include <utility> using namespace std; int main() { int l, k; cin >> l >> k; int k2 = k * 2; int ans = 0; while ( l > 0) { l -= k2; ans += k; } if (l == 0) { ans -= k; } cout << ans << endl; return 0; }