1 / 3
Apr 2012

I believe that there might be something wrong with the input data of this problem.
First time I submitted, I got WA and realised that I hadn't stripped the 'L' from
the string version of long integers. then I got a series of submissions giving NZEC.
I ran my code on ideone successfully then came back to SPOJ and got an AC with
the same code that gave NZECs
Anybody else?

  • created

    Apr '12
  • last reply

    Apr '12
  • 2

    replies

  • 149

    views

  • 2

    users

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.

Suggested Topics

Want to read more? Browse other topics in Python or view latest topics.