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.