Ad
  • Default User Avatar

    When you say "works fine" did you use the test case that your code fails on or did you pick a different one?
    Testing one input does not prove that it works for all input, and if you're going to say that the difference is a different environment then everything else should stay the same. When you change multiple things you can't say which of them is the cause.

    Suggestion: print out (and make sure to flush stdout) the input you get, and debug that locally.