結果
| 問題 |
No.1052 電子機器X
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-05-15 21:32:39 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 276 bytes |
| コンパイル時間 | 1,432 ms |
| コンパイル使用メモリ | 166,752 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-19 08:49:58 |
| 合計ジャッジ時間 | 2,108 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 WA * 5 |
ソースコード
#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,n/2);
}
else{
ans=min(k+1,n);
}
cout<<ans;
return 0;
}