Acogo挑战赛6 A题幽影之地 题型:比大小

43 阅读1分钟

www.acgo.cn/exam/41252?… image.png

很离谱,这样写竟然过不了:

#include<bits/stdc++.h>
#define int long long
using namespace std;
int s,m,w;
signed main()
{
    cin.tie(nullptr)->sync_with_stdio(false);
	cin>>s>>m>>w;

	if(s<m && s<w)
	{
		cout<<"Come back"<<endl;
		return 0;
	}
	else if(s>=m &&s<=w)
	{
		cout<<"You can do it , but be careful"<<endl;
	}
	else if(s>w && s>m)
	{
		cout<<"Go,now!"<<endl;
	}
	return 0;
}

QA4~@4D62]NKUXD5B5R2M.png

改了下才过:

#include<bits/stdc++.h>
#define int long long
using namespace std;
int s,m,w;
signed main()
{
    cin.tie(nullptr)->sync_with_stdio(false);
	cin>>s>>m>>w;

	if(s<m)
	{
		cout<<"Come back"<<endl;
		return 0;
	}
	else if(s>=m &&s<=w)
	{
		cout<<"You can do it , but be careful"<<endl;
	}
	else if(s>w)
	{
		cout<<"Go,now!"<<endl;
	}
	return 0;
}

5IQ305{$@OOYUC)`PBPAC.png