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

Tests(1/1):


#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; string l; string r; for(int i=1; i<=n; i++){ cin>>l>>r; if(l[0]=='R' && r[0]=='S' ||l[0]=='S' && r[0]=='P' || l[0]=='P' && r[0]=='R') { cout<<"Player1"<<endl; }else if(l[0] == r[0]){ cout<<"Tie"<<endl; }else{ cout<<"Player2"<<endl; } } return 0; }


测评信息: