結果
問題 | No.63 ポッキーゲーム |
ユーザー |
|
提出日時 | 2021-10-22 22:27:30 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 259 ms / 5,000 ms |
コード長 | 315 bytes |
コンパイル時間 | 1,649 ms |
コンパイル使用メモリ | 165,768 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-23 06:06:23 |
合計ジャッジ時間 | 3,302 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { long l,k; cin >> l >> k; int i = 0; int ans = 0; int count = 0; while(0 <= i){ i = (l-k*2*(count+1)); if(0 < i) count++; else break; } ans = (count * k); cout << ans << endl; return 0; }