Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
312699 黄浙峰老师 【C5-4】石头剪子布 C++ 通过 100 1 MS 256 KB 385 2025-03-15 13:13:26

Tests(1/1):


#include <iostream> #include <string> using namespace std; string s1,s2; int main() { int n; cin>>n; char a[101],b[101]; for(int i=0; i<n; i++) { cin>>a>>b; if(a[0]=='R'&&b[0]=='S'||a[0]=='S'&&b[0]=='P'||a[0]=='P'&&b[0]=='R') { cout<<"Player1"<<endl; } else if(a[0]==b[0]) { cout<<"Tie"<<endl; } else { cout<<"Player2"<<endl; } } return 0; }


测评信息: