Unable to find out the reason behind "Wrong Answer"

Hi,

I am getting “Wrong Answer” for every submission (CodeChef: Practical coding for everyone).

I have tested my code with several inputs and output was correct. Please help me locate my mistake.

Thanks.