Test cases are failing, but getting correct answer

Is there a specific format in which answers are to be printed? Coz I am getting the correct answer but all test cases failing. Please check and advice.

Resolved, I was not giving space.