为啥我的是90%呢?
#include<iostream>
#include<cstdio>
using namespace std;
int main(){
int n,a,b;
cin>>n>>a>>b;
if(a==0&&b==0) cout<<'0'<<endl;
else if(a==0||b==0) cout<<'1'<<endl;
else if(a+b<n) cout<<b+1<<endl;
else cout<<b-(a-b)<<endl;
return 0;
}
#include<cstdio>
using namespace std;
int main(){
int n,a,b;
cin>>n>>a>>b;
if(a==0&&b==0) cout<<'0'<<endl;
else if(a==0||b==0) cout<<'1'<<endl;
else if(a+b<n) cout<<b+1<<endl;
else cout<<b-(a-b)<<endl;
return 0;
}