20分求助
查看原帖
20分求助
633315
1ooper楼主2023/6/17 00:56
#include <bits/stdc++.h>
using namespace std;
int main(){
    long long a;
    cin>>a;
    string b,c;
    for(int i=1;i<=a;i++){
        cin>>b>>c;
        if(b==c){
            cout<<"Tie"<<endl;
        }
        else if(b=="Rock"&&c=="Paper"){
            cout<<"Player2"<<endl;
        }
        else if(b=="Rock"&&c=="Scissors"){
            puts("Player1");
        }
        else{
            if(b=="Scissors"&&c=="Rock")puts("Player2");
            else if(b=="Scissors"&&c=="Paper")puts("Player2");
            else if(b=="Paper"&&c=="Scissors")puts("Player2");
            else if(b=="Paper"&&c=="Rock")puts("Player1");
        }
    }
    return 0;
}
2023/6/17 00:56
加载中...