Code not passing test cases

Please check my code its runs for custom input but doesn’t pass test cases

Pls share your code by saving on ide so that I could check it…

here it is: