why i am getting a wrong answer ?

My Solution :- CodeChef: Practical coding for everyone