結果
問題 | No.63 ポッキーゲーム |
ユーザー |
![]() |
提出日時 | 2017-06-23 23:31:05 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 619 bytes |
コンパイル時間 | 720 ms |
コンパイル使用メモリ | 80,820 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-24 05:33:44 |
合計ジャッジ時間 | 1,547 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
#include <iostream>#include <string>#include <vector>#include <algorithm>#include <cmath>#include <cassert>#define FOR(i,a,b) for(int i=(a);i<(b);i++)#define REP(i,n) FOR(i,0,n)#define rep(i,n) FOR(i,0,n)#define DEBUG(x) cout<<#x<<": "<<x<<endl#define vint vector<int>#define vdouble vector<double>#define vstring vector<string>using namespace std;#include<map>#include<set>#include<queue>typedef long long ll;typedef unsigned long long ull;const int MAX_N = 1000000;int main() {ll L, K;cin >> L >> K;ll t = L / (2 * K);ll r = L - t * (2 * K);if (r == 0) t--;cout << t * K << endl;}