Ad
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    I like your naming scheem

  • Default User Avatar

    Yeah, but that's what "return a == (int)a ? (long)a : -1;" does. If it has decimals it will return -1, else it will return a;
    I figured since it passed all the other tests that there was something this formula didn't account for. Something I could fix :P
    Anyways, thanks for the kata :D

  • Default User Avatar

    Not applicable in some languages.

  • Default User Avatar

    There are only integers so you should not use floats.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    I tried avoiding reccurcivity and therefore solving for n, but a lot of the solutions ar just force-bruting it like trying until it maches or excedes...

    I would've added a test with a n an order of magnitude greater, like m = 2↑↑10 (n = 2.5*10^45) or smthg, exciding the 12'000ms timer for reccurcive methodes

    Nonetheless, it was a great kata, fun to solve