結果
| 問題 |
No.63 ポッキーゲーム
|
| コンテスト | |
| ユーザー |
weaken
|
| 提出日時 | 2020-10-09 10:48:50 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 5,000 ms |
| コード長 | 392 bytes |
| コンパイル時間 | 2,417 ms |
| コンパイル使用メモリ | 190,740 KB |
| 最終ジャッジ日時 | 2025-01-15 03:39:40 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
#include <bits/stdc++.h>
#define fastIO (cin.tie(0), cout.tie(0), ios::sync_with_stdio(false))
using namespace std;
int main() {
fastIO;
int l, k;
cin >> l >> k;
if (l % k == 0) {
if ((l / k) % 2 == 0) {
cout << ((l / k / 2 - 1) * k) << '\n';
} else {
cout << ((l / k / 2) * k) << '\n';
}
} else {
cout << ((l / k / 2) * k) << '\n';
}
return 0;
}
weaken