求问能不能过
查看原帖
求问能不能过
462173
HiAI楼主2021/10/24 17:17
#include<iostream>
using namespace std;
int a[100000005];
int main()
{
   	int n,l,r,max=0;
    cin>>n>>l>>r;
    while(l<=r)
    {
		int tmp=l%n;
		if(a[tmp])
			break;
		if(tmp>max)
			max=tmp;
		a[tmp]++;
		l++;
		}
	cout<<max;
	return 0;
}
2021/10/24 17:17
加载中...