Getting right answer of test case

I am getting wrong answer for all test cases
Please tell where is my code wrong.