#include <iostream> using namespace std; int main() { int n,m; int t; cin>>t; while(t--) { cin>>n>>m; if(n<=m) { cout<<"first"<<endl; } else if(n%(m+1)==0) { cout<<"second"<<endl; } else cout<<"first"<<endl; } return 0; }
原文:http://www.cnblogs.com/nefu929831238/p/6117012.html