3 Star 13 Fork 2

比特鹏哥/算法竞赛-C++编程课

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
main.cpp 454 Bytes
一键复制 编辑 原始数据 按行查看 历史
#include <iostream>
using namespace std;
int main()
{
int n = 0;
cin >> n;
string s1, s2;
while(n--)
{
//һϷ
cin >> s1 >> s2;
if(s1 == s2)
cout << "Tie" << endl;
else if(s1 == "Rock" && s2=="Scissors")
cout << "Player1" << endl;
else if(s1 == "Scissors" && s2=="Paper")
cout << "Player1" << endl;
else if(s1 == "Paper" && s2=="Rock")
cout << "Player1" << endl;
else
cout << "Player2" << endl;
}
return 0;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/bitpg/algorithm-competition-cpp.git
git@gitee.com:bitpg/algorithm-competition-cpp.git
bitpg
algorithm-competition-cpp
算法竞赛-C++编程课
master

搜索帮助