求大佬 分数是100分但是没通过
查看原帖
求大佬 分数是100分但是没通过
677641
luogu_Gerry楼主2023/11/14 16:23

求大佬 分数是100分但是没通过

#include <bits/stdc++.h>
using namespace std;
int main()
{
	int t1,t2,ans=0,maxn=0;
	cin>>t1>>t2;
	if(t1+t2>8)
		{
			ans=1;
			maxn=t1+t2;
		}
	for(int i=1;i<=7;i++)
	{
		if(t1+t2>maxn)
		{
			ans=i;
			maxn=t1+t2;
		}
	}
	if(ans>8) cout<<ans<<endl;
	else cout<<"0"<<endl;
	return 0;
}

2023/11/14 16:23
加载中...