Which test case i am not considering in my code

My code is working perfectly fine, but I don’t know what test case I’ve not considered in my code. Pls help me with this issue

here is the link:

hi @priyanshu180901_fb9ce5685f941d19
your logic is absolutely correct… but look at the constraints

0<=n<=1000000000000

so just use long long int instead of int, your code will pass all test cases…

corrected code -->

thanks very much, now I understand why many of my codes were failing some test cases, even though the logic behind them was correct.

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.