3 / 5
Feb 2018

Hello,

I did multiple SPOJ problems, and for some reason, all of my programs (tested on repl.it2) produced the same answers and the programs exited almost instantaneously, but when I submit them onto the judge, I get “wrong answer” or “time limit exceeded”. For example, if you look at the attached screenshot, you can see that the program returns the same result as the model answer (the problem is TMUL), but the judge rejects it.

  • created

    Feb '18
  • last reply

    Feb '18
  • 4

    replies

  • 1.4k

    views

  • 3

    users

  • 2

    links

Oddly enough, if I searched up “spoj TMUL solution” and copied and pasted their solutions, it passes perfectly… I did a diff between the results of my program and the one I got off of google, and it detected no difference… Could it be something with whitespace or formatting?

For some hints about how to solve “wrong answer” and “time limit exceed” check out the post

Good luck

It could be a difference that only becomes apparent when you use certain test data, for example, did you test it on input with 10000 digits? Did you test it with negative numbers?

Or it could be a difference in the compiler (or compiler setting) between your system and that used on SPOJ. I’ve been caught out in the past because I develop in Delphi 5 or 7, then submit using Free Pascal.