HDU 1846 (巴什博弈)

来源:互联网 发布:知乎 可怕 编辑:程序博客网 时间:2024/05/16 17:48
题目:http://acm.hdu.edu.cn/showproblem.php?pid=1846

代码:

#include <stdio.h>#include <string.h>#include <algorithm>using namespace std;int main(){    int t,n,m;    scanf("%d",&t);    while(t--)    {        scanf("%d%d",&n,&m);        if(n%(m+1))            printf("first\n");        else            printf("second\n");    }    return 0;}


0 0
原创粉丝点击