FLIPCOIN: Runtime error

I don’t understand why this question is giving runtime error(NZEC), as if there is an exception, it should be giving wrong answer. Please help!

http://www.codechef.com/viewsolution/2059525