Failing all test cases including case 0 despite getting same answer as sample

hello @gautam74
check now

does adding an “endl” statement make a difference for an online judge?

yes…
if u dont add endl then all the outpput will be in same line and hence it will not match with expected output

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.