Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
77793 sh25_wanghy 石头剪子布 C++ 通过 0 MS 244 KB 557 2025-12-26 14:48:56

Tests(1/1):


#include <iostream> #include <string> using namespace std; int main() { int N; cin >> N; for (int i = 0; i < N; i++) { string p1, p2; cin >> p1 >> p2; if (p1 == p2) { cout << "Tie" << endl; } else if ((p1 == "Rock" && p2 == "Scissors") || (p1 == "Scissors" && p2 == "Paper") || (p1 == "Paper" && p2 == "Rock")) { cout << "Player1" << endl; } else { cout << "Player2" << endl; } } return 0; }


测评信息: