結果

問題 No.63 ポッキーゲーム
ユーザー siguma323
提出日時 2016-05-03 18:38:58
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 373 bytes
コンパイル時間 522 ms
コンパイル使用メモリ 65,692 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-05 04:56:40
合計ジャッジ時間 1,244 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <numeric>
#include <string>
#include <vector>
#include <iostream>
#include <queue>
#include <utility>
#include <cmath>
using namespace std;

using ull = unsigned long long;

int main()
{
    ull l,k;
    cin >> l >> k;

    int num = ceil(l/(2*k));

    if(num & 1)
        cout << (num-1)*k << endl;
    else
        cout << num*k << endl;
}
0