求助(玄关)
查看原帖
求助(玄关)
1048701
Send_to_Intruder楼主2024/6/14 11:01
# include <iostream>
# include <queue>
using namespace std;


signed main()
{
	int n,l,r,maxn=0;
	cin >> n >> l >> r;
	if(r - l > n){
		cout << n - 1;
		return 0;
	}
	for (int i = l; i <= r; i ++)
		maxn = max(maxn,i%n);
	cout << maxn << endl;
	return 0;
}
2024/6/14 11:01
加载中...