Error in program

Why is my ans not correct

I have edited your code, you havent taken the input the no of test cases, try to submit your code now,