OJ-Problems-Source/HDOJ/1846.cpp

24 lines
350 B
C++
Raw Normal View History

2016-09-25 23:04:53 +08:00
#include <cstdio>
#include <cstdlib>
#include <cstring>
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)
{
printf("second\n");
}
else
{
printf("first\n");
}
}
return 0;
}