Please tell me the mistake in my code

please tell me the mistake in my code…

@Ayushmahajan513
there are few mistakes in your code

  1. you’re printing an extra new line for each testcase. Just comment out line no. 59
  2. initialise f=0; for each testcase. So at the beginning of while loop write f=0;
    all testcase will pass