您的位置:首页 > 其它

HDU 1846 Brave Game (简单博弈)

2015-11-28 13:29 162 查看
题目链接:acm.hdu.edu.cn/showproblem.php?pid=1846

题目大意:中文题目,不再累述!

解题思路:一个单词来形容,water!

show me the code!

#include <iostream>
using namespace std;
int main() {
int T;
cin >> T;
for (int I = 1; I <= T; ++I) {
int N, M;
cin >> N >> M;
cout << (N % (M + 1) == 0 ? "second" : "first") << endl;
}
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  游戏