Python 3.6 NZEC Error

I cannot understand what’s wrong with my code :frowning:

Problem Code: HIT
Contest: OCT Lunchtime
Solution: https://www.codechef.com/viewsolution/27583874

I keep getting NZEC error, I don’t understand why!
Plz help!!