11.14打字练习乙组
2023-11-14 14:43
views:
494
source:
云领橙长
cmath length copy clear vector map set class catch unsigned putchar getchar printf new
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;}
Disclaimer: The above articles are added by users themselves and are only for typing and communication purposes. They do not represent the views of this website, and this website does not assume any legal responsibility. This statement is hereby made! If there is any infringement of your rights, please contact us promptly to delete it.