結果
| 問題 |
No.1052 電子機器X
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-06-15 00:28:58 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 265 bytes |
| コンパイル時間 | 1,355 ms |
| コンパイル使用メモリ | 166,208 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-25 12:16:14 |
| 合計ジャッジ時間 | 2,188 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 16 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, n) for (int i = 0; i < (n); i++)
#define P pair<int, int>
int main() {
int n,k;
cin >> n >> k;
if (n%2) cout << min(k+1,n) << endl;
else cout << min(k+1, n/2) << endl;
}