How to make ans 100% correct

I passed in 3 out of 4 test cases, how to find where my code went wrong?

Save your code on ide.codingblocks.com and then share its link if all test cases are not passed yet.