提交时间:2021-12-06 21:13:50
运行 ID: 33559
#include<bits/stdc++.h> using namespace std; int main(){ // freopen("candy.in","r",stdin); // freopen("candy.out","w",stdout); int n,l,r,x,y; cin>>n>>l>>r; x=n; y=l/n; x=n*y; x+=n-1; while(1) { if(x>r) --x; else break; } cout<<x%n; return 0; }//candy