Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Exactly the solution I came up with :)
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?
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.
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.
But there is, see how 48933 persons have already done it. The tests are fine, read the hint in the description.
There isnt a way to run this kata without timing out the test engine. You need to lower the test numbers.