Why my answer is coming incorrect?

i have given the code, and also tested all the cases. Why am i not getting perfect hundred?