Ad
  • Custom User Avatar

    Exactly the solution I came up with :)

  • Custom User Avatar

    If your tests can only work, if you coded it a very specific manner, then the entire kata is flawed from the ground up.

    This is not exactly correct. to sovle this kata, you do not need "a very specific manner". You need to find a way which is fast enough, but there is more than one such way. The slow ones will not work, but all fast ones will work. You need to use any of the efficient algorithms.

    Counting with fingers will not work either, you will run ouf of fingers. Does this mean the kata is wrong?

  • Custom User Avatar

    Your perfectly working code doesn't work for the input range. You can't ask for a smaller range so your code works. The kata is not flawed and not all the people who solved it had to google how to do it. Sorry if you didn't like it, but it is what it is.

    What you should learn from this kata is that which algorithm you use, depends on the input values. The description literally says you shouldn't calculate the factorial, so don't expect doing the opposite to work.

  • Custom User Avatar

    I know someone had replied earlier. But I'm sorry to say, its just not a solid argument that 17k other people have compeleted this. I know I wrote perfectly working code. If your tests can only work, if you coded it a very specific manner, then the entire kata is flawed from the ground up. It doesnt teach anyone anything if you have to go do a google search to get the solution.

  • Custom User Avatar

    But there is, see how 48933 persons have already done it. The tests are fine, read the hint in the description.

  • Custom User Avatar

    There isnt a way to run this kata without timing out the test engine. You need to lower the test numbers.