Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
30364 | lmz120809 | 石头剪子布 | C++ | Accepted | 1 MS | 252 KB | 393 | 2023-11-07 20:38:16 |
#include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> using namespace std; int main() { char s1[30]={},s2[30]={}; int n; cin>>n; while(n--){ cin>>s1>>s2; if(s1[0]=='R'&&s2[0]=='S'||s1[0]=='P'&&s2[0]=='R'||s1[0]=='S'&&s2[0]=='P'){ cout<<"Player1"<<endl; } else if(s1[0]==s2[0]) cout<<"Tie"<<endl; else cout<<"Player2"<<endl; } return 0; }