I am getting wrong ans

in manual input, it gives the correct answer . but it is failing the testcases

You are not following the proper output format

now i have corrected the output format , but still getting wrong ans

The thing that you have to print is the test case number, not n
so if there are t test cases print
#1
#2
#3
…
#t
I hope it is clear

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.