HDU 1846 Brave Game


\(HDU1846\)

做这道题你会感觉很欣喜。几乎比上边还简单。

#include 
using namespace std;
int main() {
    int T;
    scanf("%d", &T);
    while (T--) {
        int n, m;
        scanf("%d %d", &n, &m);
        if (n % (m + 1) == 0)
            cout << "second" << endl;
        else
            cout << "first" << endl;
    }
    return 0;
}

相关