| 记录编号 | 573537 | 评测结果 | AAAAAAAATT | ||
|---|---|---|---|---|---|
| 题目名称 | 3615.[CSP 2021J]分糖果 | 最终得分 | 80 | ||
| 用户昵称 | 是否通过 | 未通过 | |||
| 代码语言 | C++ | 运行时间 | 2.142 s | ||
| 提交时间 | 2022-07-27 08:50:22 | 内存使用 | 1.72 MiB | ||
#include<bits/stdc++.h>
using namespace std;
int main()
{
freopen("candy.in","r",stdin);
freopen("candy.out","w",stdout);
long long int n,L,R,i,j,a,maxx=0;
cin>>n>>L>>R;
for(i=L;i<=R;i++)
{
a=i%n;
maxx=max(a,maxx);
}
cout<<maxx;
}