【HDU1846】Brave Game(博弈論)

題面

HDUphp

題解

\(Bash\ Game\)模板題ios

#include<iostream>
using namespace std;
int T,n,m;
int main()
{
    ios::sync_with_stdio(false);
    cin>>T;
    while(T--)
    {
        cin>>n>>m;
        if(n%(m+1))cout<<"first"<<endl;
        else cout<<"second"<<endl;
    }
    return 0;
}
相關文章
相關標籤/搜索