#include<bits/stdc++.h> using namespace std; int main(){ int n,l,r;cin>>n>>l>>r; if(l+n<=r)cout<<n-1; else cout<<max(l%n,r%n); return 0; }
例如,数据 4 10 13 就不对,但是我提交后民间数据可以100分。