結果

問題 No.63 ポッキーゲーム
ユーザー michonz4
提出日時 2019-05-23 12:35:23
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 207 bytes
コンパイル時間 381 ms
コンパイル使用メモリ 54,260 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-17 09:43:49
合計ジャッジ時間 2,374 ms
ジャッジサーバーID
(参考情報)
judge4 / judge6
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 17 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

using namespace std;

int main(){
  int L, K, cnt=0;
  cin >> L >> K;
  for (int i=0, j=L; i<L/2; i+=K, j-=K) {
    if (i<j) cnt++;
  }
  cout << ((cnt-1)*K>=0 ? (cnt-1)*K: 0) << endl;
}
0