NZEC python

I am new to codechef and facing the NZEC error that i never had on any website. My code is accurate and does gives the correct output. Then why is it that i am facing this error? I have also checked many of the discussions on this and went through many of the fixes, which in my solution is already present(map(), or the list comprehension).
Here is a link to my solution. Please help if you can.