結果
問題 |
No.63 ポッキーゲーム
|
ユーザー |
![]() |
提出日時 | 2016-08-07 22:28:16 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 290 bytes |
コンパイル時間 | 418 ms |
コンパイル使用メモリ | 53,752 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-07 09:53:55 |
合計ジャッジ時間 | 1,143 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 17 WA * 5 |
ソースコード
#include <iostream> using namespace std; int main() { int len, x; int num; cin >> len >> x; num = len / 2; if (num%x != 0) { cout << (num / x) * x << endl; } else { if (num / x != 0) { cout << (num / x - 1) * x << endl; } else { cout << 0 << endl; } } return 0; }