mirror of
https://github.com/wczffl-503/OI-Codes.git
synced 2025-07-08 02:13:51 +08:00
d
This commit is contained in:
16
XSM OJ 重庆小码王集团OJ/【字符串】石头剪子布.cpp
Normal file
16
XSM OJ 重庆小码王集团OJ/【字符串】石头剪子布.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
signed main()
|
||||
{
|
||||
int n;
|
||||
cin >> n ;
|
||||
for(int i = 1; i <= n; ++ i)
|
||||
{
|
||||
string s1, s2;
|
||||
cin >> s1 >> s2 ;
|
||||
if(s1 == "Rock" && s2 == "Scissors" || s1 == "Scissors" && s2 == "Paper" || s1 == "Paper" && s2 == "Rock") cout << "Player1" << endl ;
|
||||
else if(s1 == s2) cout << "Tie" << endl ;
|
||||
else cout << "Player2" << endl ;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user