I haven't solved that problem, yet, but I don't think there is a problem with the input data of that problem.
Explanation (only a guess, as I don't know your code):
You used a function in your code that is not available in Python 2.5, e.g. the bin() function.
On IDEONE Python 2.6 is running which already has bin() implemented, so your code passes.
Actually there is at least one of the SPOJ servers that has Python 2.7 running instead of Python 2.5. As you have no influence, which of the servers processes your code (at least I think so), your code sometimes runs on Python 2.7 (-> 4.0 MB mem instead of 3.6/3.7 MB) and gets AC, other times it runs on Python 2.5 and you get a NZEC. That's what happenend here.
I pointed that out in the "Bugs"-subforum, but it doesn't seem to be of significant interest.