Ad
  • Custom User Avatar

    +1 for changing output type to Integer.

    I've cheated here writing actual hamming signature as Int -> Integer and it passed all tests anyway so there are no overflows in the testing environment. But the Haskell translation of the kata should be definitely changed because Haskell standard guarantees only that Int values are at least in [-2^29 ... 2^29-1] and hamming 5000 is greater that 2^45.

  • Custom User Avatar

    My solution calculates factorization for 4000! (it is the highest n in the description) in 78 milliseconds on the local machine. Have no idea why I get timeout here on Codewars (which is 12 sec).

  • Custom User Avatar

    This solution is bad, Int overflow may happen when iterate over powers.

  • Custom User Avatar

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