結果
問題 | No.63 ポッキーゲーム |
ユーザー |
![]() |
提出日時 | 2017-11-13 20:46:26 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 382 bytes |
コンパイル時間 | 865 ms |
コンパイル使用メモリ | 73,148 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-24 05:46:51 |
合計ジャッジ時間 | 1,583 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
#include <iostream> #include <iomanip> #include <string> #include <limits.h> #include <math.h> #include <vector> #include <algorithm> #include <map> #include <numeric> #include <cmath> using namespace std; int main(){ long long l,k; cin >> l >> k; if(l == 2 * (l/(2*k) * k)){ cout << (l/(2*k) - 1) * k << endl; }else{ cout << l/(2*k) * k << endl; } return 0; }