Test case failed

My code was running good for many custom inputs but it is passing only for one test case, can you please help and correct me.

This is the question https://online.codingblocks.com/app/player/208414/content/198578/5385/code-challenge
This is my code
https://ide.codingblocks.com/s/643205

hi @swaroop_stellar
refer my code --> https://ide.codingblocks.com/s/643262

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.