Why is my answer marked wrong? ( problem# PCJ18)

Link to the problem: PCJ18B Problem - CodeChef

Link to my solution: CodeChef: Practical coding for everyone

This is my first submission and my answer was marked wrong. Can you please see what was the error? My answer is in Python 3

Check the following update to your code.

Accepted