第二个点过不去哎...
查看原帖
第二个点过不去哎...
235786
Alone0213楼主2021/10/27 17:26
#include<bits/stdc++.h>
using namespace std;

int n,l,r;
int maxx;
int main(){
	scanf("%d%d%d",&n,&l,&r);
	for(int i=1;maxx<r;i++) maxx+=n;
	if(maxx>r){
		maxx-=n;
		if(maxx>=l) return printf("%d",n-1)&0;
		else return printf("%d",r-maxx)&0;
	}
	if(maxx==r){
		printf("%d",n-1);
		return 0;
	}
	return 0;
}
2021/10/27 17:26
加载中...