Can you tell me why my code is not working on all test cases? What am I missing?

Can you tell me why my code is not working on all test cases? What am I missing?

hi @sakshi_singhal
corrected code -->


It’s working fine and passing all test cases now…

What was wrong in my code?

@Vaibhav277 When I changed type of x and y to ll from int then it is passing all the test cases but the value of x and y can be accommodated in int then why it was failing previously.

@sakshi_singhal
It shouldn’t have failed… maybe some compiler issues…

@sakshi_singhal
is there anything else??

No, you can resolve it. Thanks!

1 Like

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.