Why this solution is giving wa

solution :CodeChef | Competitive Programming | Participate & Learn
question link: CodeChef | Competitive Programming | Participate & Learn