Accepted
代码
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,l,r,num;
cin>>n>>l>>r;
num=l/n+1;
if(n*num-1<=r)
cout<<n-1;
else
cout<<r%n;
return 0;
}
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,l,r,num;
cin>>n>>l>>r;
num=l/n+1;
if(n*num-1<=r)
cout<<n-1;
else
cout<<r%n;
return 0;
}