#include<bits/stdc++.h>
using namespace std;
int a[1000000];
int main(){
freopen("candy.in","r",stdin);
freopen("candy.out","w",stdout);
long long int n,l,r;
cin >> n >> l >> r;
for (int i=l;i<=r;i++)
{
a[i]=i%n;
}
sort(a+1,a+1+r);
cout << a[r];
}
共 1 条回复
有Runtime Error