結果
問題 | No.1052 電子機器X |
ユーザー |
![]() |
提出日時 | 2020-05-15 22:27:15 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 300 bytes |
コンパイル時間 | 622 ms |
コンパイル使用メモリ | 78,464 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-19 11:17:34 |
合計ジャッジ時間 | 1,289 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 16 |
ソースコード
#include <cmath> #include <vector> #include <iostream> #include <algorithm> #include <functional> using namespace std; const int inf = 1012345678; int main() { cin.tie(0); ios_base::sync_with_stdio(false); int N, K; cin >> N >> K; cout << min(N % 2 == 0 ? N / 2 : N, K + 1) << endl; return 0; }