hdu 1846 Brave Game (巴什博弈)

 

 

#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
    int t,n,m;
    int i,j,k;
    scanf("%d",&t);
    while(t--)
    {
        scanf("%d%d",&n,&m);
        if(n%(m+1)!=0)
        {
            printf("first\n");
        }
        else printf("second\n");
    }
    return 0;
}

 

posted @ 2015-08-18 22:39  sola94  阅读(104)  评论(0编辑  收藏  举报