結果

問題 No.63 ポッキーゲーム
ユーザー たこし
提出日時 2014-11-12 19:42:09
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 708 bytes
コンパイル時間 684 ms
コンパイル使用メモリ 86,168 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-24 04:42:44
合計ジャッジ時間 1,386 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

#define INF 1000000000
#define EPS 1e-9
#define PI acos(-1)

typedef long long ll;
typedef pair<int, int> P;

ll L;
int K;

int main(){

  cin >> L >> K;
  
  ll num;
  num = L/(2*K);
  if(L%(2*K) == 0)
    num--;
  cout << num * K << endl;

  return 0;

}
0