提交时间:2023-12-18 18:44:17
运行 ID: 34314
#include<bits/stdc++.h> using namespace std; int main() { char a[10],b[10];//两个玩家的选择情况 int n; cin >> n; for (int i = 1; i <= n; i++) { cin>>a>>b; //比较a和b if(a[0]==b[0]) { cout<<"Tie"<<endl; }else if(a[0] == 'R' && b[0]=='S' || a[0] == 'S' && b[0] == 'P' || a[0] == 'P' && b[0] == 'R') { cout<<"Player1"<<endl; }else { cout<<"Player2"<<endl; } } return 0; }