格式错误???????
查看原帖
格式错误???????
1287834
coduck_lys楼主2024/11/9 10:36

格式错误???????

WA代码:

using namespace std;
int n,cnt;
int main() {
	cin>>n;
	for(int i=0;i<n;i++){
		string c,c1;
		cin>>c>>c1;
		if(c=="Rock"){
			if(c1=="Scissors"){
				cout<<"Player1";
			}
			else if(c1=="Paper"){
				cout<<"Player2";
			}
		}
		if(c=="Scissors"){
			if(c1=="Paper"){
				cout<<"Player1";
			}
			else if(c1=="Rock"){
				cout<<"Player2";
			}
		}
		if(c=="Paper"){
			if(c1=="Rock"){
				cout<<"Player1";
			}
			else if(c1=="Scissors"){
				cout<<"Player2";
			}
		}
		if(c==c1){
			cout<<"Tie";
		}
	}
2024/11/9 10:36
加载中...