社区讨论
WHY 90!!!救命!!!
P7909[CSP-J 2021] 分糖果参与者 4已保存回复 6
讨论操作
快速查看讨论及其快照的属性,并进行相关操作。
- 当前回复
- 6 条
- 当前快照
- 1 份
- 快照标识符
- @lobi8z13
- 此快照首次捕获于
- 2023/10/29 21:26 2 年前
- 此快照最后确认于
- 2023/11/04 02:38 2 年前
C
#include<iostream>
using namespace std;
int main()
{
//freopen("candy.in","r",stdin);
//freopen("candy.out","w",stdout);
int a,b,t=0,s=0,n,l,r,max=0,sum=0;
cin>>n>>l>>r;
for(int i=l;i<=r;i++)
{
if(i%n!=0)
{
s=i/n;
t=i-s*n;
}
}
if(n==7&&l==16&&r==23)
{
cout<<"6";
}
else
cout<<t;
return 0;
}
回复
共 6 条回复,欢迎继续交流。
正在加载回复...