Problem with the code

all the test cases did not pass.
Can u tell me where is the problem?

You were printing all the test cases on the same line instead of printing the output of a test case on a different line.I have made that change and now it is getting accepted.


If you feel that your doubt has been resolved then please mark it as resolved and give you feedback.