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.
It is the same in most languages. For some reason we are passed strings. You need to find a way to handle it.
In C++ (visual studio 2022) long long int is 64 bits too, so bigger factorials will not fit. Is this part of the challenge?
i spent the last two hours very nearly completing this and then wondering why the ordering in the examples given was so... odd. thank you for simplifying this
This Kata was fun! I just have one suggestion. I'm not sure if it's built in to other languages, but for Swift there is no way to calculate positive integer values larger than what can be represented with unsigned 64bit integers. This means a factorial of 20 (or digit "K") is the largest that can be calculated.
I had to work around this by "pretending" digits larger than K didn't exist. Luckily, none of your test examples have digits larger than K.
Otherwise, you would have to implement your own BigInt data type, which is something that's way outside of the scope of this kata!