NZEC error python

I am getting NZEC error even when I am running someone else’s code which has been correctly submitted on Codechef for DSA learning series. Why is this happening?
I’ve already tried try and except, but then it gives WA.

Please help!

Check for overflows, casting variables, Memory Overflows, illegal memory access.

Link to the submission that gets NZEC error?

Just to check: are you trying to “Run” without Providing “Custom Input”?