Where I got wrong in this problem? (FASTROAD)

Problem: CodeChef: Practical coding for everyone
Solution: CodeChef: Practical coding for everyone