Ad
  • Custom User Avatar

    There is a 6000ms time limit for the tests in order to test performance.
    While your code works for smaller numbers like 5 & 10, it is probably too ineffecient for larger numbers.

    In ruby for example, n may be as high as 10**8.
    You need to think of a faster way to solve the problem.