2 条题解
- 1
信息
- ID
- 2016
- 时间
- 1000ms
- 内存
- 512MiB
- 难度
- 6
- 标签
- 递交数
- 326
- 已通过
- 110
- 上传者
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,L,R;scanf("%d%d%d",&n,&L,&R);
if(R-L>=n)printf("%d\n",n-1);
else
{
L=L%n;R=R%n;
if(L<=R)printf("%d\n",R);
else printf("%d\n",n-1);
}
return 0;
}