Ad
  • Custom User Avatar

    No.

  • Default User Avatar

    The problem is probably that your algorithm is to slow for the numbers used in the submit tests as they are much larger than the numbers used in the example tests.

    Edit:

    If your solution returns 17179869183 when n = 10000000000 in a short amount of time you should probably be able to pass

    (Note: this is just an example of a case where iteration won't work, there are however even large tests)

  • Default User Avatar

    Does your solution work with the example tests?

  • Custom User Avatar

    Maybe there is another corner case with the null or empty?

  • Custom User Avatar

    Did you think of corner cases?