You are viewing a single comment's thread. Return to all comments →
you can take care of the TLE using StringBuilder:
public static void main(String[] args) { Scanner in= new Scanner(System.in); int t=in.nextInt(); StringBuilder s= new StringBuilder(); while(t-->0){ int n=in.nextInt(); s.append(n%8==0? "Second\n" :"First\n"); } System.out.println(s); }
Seems like cookies are disabled on this browser, please enable them to open this website
Powers Game
You are viewing a single comment's thread. Return to all comments →
you can take care of the TLE using StringBuilder: