11.14打字练习乙组
operator sizeof scanf switch struct for false true bits/stdc++.h default continue case
break string void "" ; << # >> ( * ) & % $ @ ! float const endl namespace iostream using
#include<bits/stdc++.h> using namespace std; int main(){ freopen("candy.in","r",stdin);
freopen("candy.out","w",stdout); long n,l,r,k,i,sum; cin>>n>>l>>r; int m=l%n; int d=r-l;
if(m+d>=n-1){ sum=n-1;} else{ sum=m+d;} cout<<sum; fclose(stdin); fclose(stdout);
return 0;}