結果
| 問題 |
No.1052 電子機器X
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-05-15 21:37:39 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 278 bytes |
| コンパイル時間 | 1,464 ms |
| コンパイル使用メモリ | 165,852 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-19 08:56:50 |
| 合計ジャッジ時間 | 2,081 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 16 |
ソースコード
#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n,k;
cin>>n>>k;
int ans=0;
if(n%2==0){
ans=min(k+1,n/2);
}
else{
ans=min(k+1,n);
}
cout<<ans;
return 0;
}