zoukankan      html  css  js  c++  java
  • hdu1846 巴什博奕

    简单。

    #include<stdio.h>
    #include<string.h>
    int main()
    {
        int i,t,n,m;
        scanf("%d",&t);
        while(t--)
        {
            scanf("%d%d",&n,&m);
            if(m>=n)
                printf("first
    ");
            else
            {
                if(n%(m+1))//有余数的话 先手取余数 后手满足(m+1)*k 所以后手必输
                    printf("first
    ");
                else printf("second
    ");
            }
        }
    }
  • 相关阅读:
    HDU 1429
    HDU 1622
    HDU 3335
    HDU 4160
    HDU 1350
    HDU 5086
    HDU 1300
    HDU 3047
    HDU 3038
    HDU 5100
  • 原文地址:https://www.cnblogs.com/sweat123/p/4749960.html
Copyright © 2011-2022 走看看