Ad
  • Custom User Avatar
  • Default User Avatar

    leading zeroes are not out of specs

  • Custom User Avatar

    (C) Not gonna lie, I'm pretty miffed about the gross amount of leading zeroes that the input contains, despite leading zeroes not being allowed in the output.

  • Custom User Avatar

    A good try is to make the algorithm as simple as possible, with the least wrapping with object, the least function calls nd the simplest loop. In some languages it is enough to let you go below the 12 second, although not with a great margin.

    One hint is in the description itself. As k and n grow the sum converges, suggesting that you may not need to care about terms that are too small. the test even gives away the tolerance error.

    A last technique, somewhat advanced but very useful an generic, is memoization.

  • Custom User Avatar

    Too bad async functions don't work. I had to write my own scheduler