<---------------- 先拿完的赢 ----------------->
#include<iostream>
using namespace std;
int main(){
long long count;
long long n,k;
bool res[1000000];
cin>>count;
for(int i=0;i<count;i++){
cin>>n>>k;
if(n%(k+1)!=0)
res[i]=true;
else res[i]=false;
}
for(int i=0;i<count;i++){
if(res[i])
cout<<"First Man Win!"<<endl;
else
cout<<"Last Man Win!"<<endl;
}
return 0;
}
<---------------- 先拿完的输 ----------------->
#include<iostream>
using namespace std;
int main(){
long long count;
long long n,k;
bool res[1000000];
cin>>count;
for(int i=0;i<count;i++){
cin>>n>>k;
if((n-1)%(k+1)!=0)
res[i]=true;
else res[i]=false;
}
for(int i=0;i<count;i++){
if(res[i])
cout<<"First Man Win!"<<endl;
else
cout<<"Last Man Win!"<<endl;
}
return 0;
}