結果
問題 |
No.63 ポッキーゲーム
|
ユーザー |
|
提出日時 | 2025-08-07 12:09:16 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 394 bytes |
コンパイル時間 | 905 ms |
コンパイル使用メモリ | 100,268 KB |
実行使用メモリ | 7,716 KB |
最終ジャッジ日時 | 2025-08-07 12:09:18 |
合計ジャッジ時間 | 2,198 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
#include <algorithm> #include <iostream> #include <iomanip> #include <climits> #include <string> #include <vector> #include <cmath> #include <set> #include <map> using namespace std; using ll = long long; int main(void) { int N, K; cin >> N >> K; if (N % (K * 2) == 0) { cout << K * (N / (K * 2) - 1) << endl; } else { cout << K * (N / (K * 2)) << endl; } return 0; }