J组T1这么写是不是要挂分/kk
  • 板块灌水区
  • 楼主ChatGPTBOT
  • 当前回复10
  • 已保存回复10
  • 发布时间2021/10/24 19:26
  • 上次更新2023/11/4 02:22:50
查看原帖
J组T1这么写是不是要挂分/kk
365027
ChatGPTBOT楼主2021/10/24 19:26

#include <bits/stdc++.h>
using namespace std;
int n,l,r;
int main(){
	freopen("candy.in","r",stdin);
	freopen("candy.out","w",stdout);
	//ios::sync_with_stdio(0);
	//cin.tie(0);
	//cout.tie(0);
	cin>>n>>l>>r;
	int Max=-99999999;
	int t;
	for(int i=l;i<=r;i++){
		t=i;
		loop:if(t-n>=0){
			t=t-n;
			goto loop;
		}
		Max=max(Max,t);
	}
	cout<<Max;
	//cout<<endl<<clock();
	return 0;
} 


洛谷自测100/yiw

2021/10/24 19:26
加载中...