I couldn't understand this problem!

I couldn’t understand this problem, I’m confused! The Input format says that the input will have 4 lines, while the sample input has 9 lines. Also output format says, the output will have only 1 line, while the sample output has 2 lines. :confused:

hello @moon there are number of test cases
i.e in the sample test case the first line inout is the number of test cases.
and each input there will be 4 lines so 2*4=8 this is the input format.
if you have any other doubt you can ask here.

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.