1. 程式人生 > >HDU 1846: Brave Game (in Java)

HDU 1846: Brave Game (in Java)

problem spa string print ans system http span pre


/**
* @link http://acm.hdu.edu.cn/showproblem.php?pid=1846
* @author Sycamore
* @date Aug, 21
*/
import java.util.*;

class Main{

public static void main(String args[]){
Scanner scanner=new Scanner(System.in);
int c=scanner.nextInt();
while(c--!=0){
int n=scanner.nextInt(),m=scanner
.nextInt();
System.out.println(n%(m+1)!=0?"first":"second");
}
scanner.close();
}
}

HDU 1846: Brave Game (in Java)