Loop not working

https://ide.codingblocks.com/s/38635 - code
https://hack.codingblocks.com/contests/c/255/59 - problem

my loop should run 2 times but i dont know why it is running only one time . please help

Hey Kushal, Outer for loop is executing only once because you are using the variable i only for iterating in nested for loops, so value of i gets updated and i no longer remains < no. of test cases.
To correct this error, use some other variable to iterate in nested loops.