Ad
  • Custom User Avatar

    It is the same in most languages. For some reason we are passed strings. You need to find a way to handle it.

  • Custom User Avatar

    In C++ (visual studio 2022) long long int is 64 bits too, so bigger factorials will not fit. Is this part of the challenge?

  • Custom User Avatar

    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

  • Custom User Avatar

    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!