Ad
  • Default User Avatar

    I think you should feel good. While this solution can beat down the given tests, if you gave it a large interval, it would never finish and use up all of your memory, even though there are ways to make it use very little memory and finish in an instant for arbitrarily large intervals.

  • Custom User Avatar

    OMG! I speant all day on my long*&5 answer and this is so simple and clean! great work!