题解 | #排队领水#
排队领水
https://ac.nowcoder.com/acm/contest/19304/T
#include<iostream> using namespace std; int main() { int a,b,n; cin>>n>>a>>b; if(a+b<n)cout<<b+1<<endl; else cout<<n-a; }
排队领水
https://ac.nowcoder.com/acm/contest/19304/T
#include<iostream> using namespace std; int main() { int a,b,n; cin>>n>>a>>b; if(a+b<n)cout<<b+1<<endl; else cout<<n-a; }
相关推荐