結果

問題 No.63 ポッキーゲーム
ユーザー 4802525
提出日時 2019-03-29 21:52:49
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 417 bytes
コンパイル時間 1,298 ms
コンパイル使用メモリ 157,400 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-07 01:25:57
合計ジャッジ時間 2,100 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 15 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define REP(i,N) for(i=0;i<N;i++)
typedef long long ll;
typedef pair<int, int> P;
typedef struct{
  int first;
  int second;
  int third;
}T;

//昇順
bool comp_Se(T& l, T& r){
  return l.second < r.second;
}

int main(void){
  ll L,K,ans=0,mod;
  cin >> L >> K;
  if(mod=L%(2*K)) ans=(L-mod)/2;
  else ans=min((ll)0,(L-mod-2*K)/2);
  cout << ans << endl;
  return 0;
}
0