http://acm.hdu.edu.cn/showproblem.php?pid=1846
题解:巴什博奕
代码:
#include <bits/stdc++.h> using namespace std; int main() { int N; scanf("%d", &N); while(N --) { int n, m; scanf("%d%d", &n, &m); if(n % (m + 1) != 0) printf("first\n"); else printf("second\n"); } return 0; }
原文:https://www.cnblogs.com/zlrrrr/p/9417362.html