Program not passing all testcases

Program failing but passing successfully for the given sample test case. check and confirm, all the conditions have been handled,