自己试过了所有共9种结果,但是0分,全WA,求各位大佬帮助!
查看原帖
自己试过了所有共9种结果,但是0分,全WA,求各位大佬帮助!
996200
President_Zhao楼主2023/7/6 20:26
#include<bits/stdc++.h>
using namespace std;
int main()
{
	int g;
	string f1,f2;
	cin>>g;
	for(int p=0;p<g;p++)
	{
		cin>>f1>>f2;
		if(f1[0]==f2[0])
		{
			cout<<"Tie";
		}
		else if(f1[0]=='R'&&f2[0]=='S'||f1[0]=='S'&&f2[0]=='P'||f1[0]=='P'&&f2[0]=='R')
		{
			cout<<"Player1";
		}
		else
		{
			cout<<"Player2";
		}
	}
}
2023/7/6 20:26
加载中...