Getting WA on submission for CHPINTU

Problem Statement : CHPINTU Problem - CodeChef
My Submission : CodeChef: Practical coding for everyone
Passed Sample test case but getting wrong answer.
Please help me out, where I am going wrong ?