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.
there is no way
msc3000 , have you solved this kata without any issues ? check my code in Pycharm or VSC , the code works fine without any issues .Probably there's another solution for this kata without timeout limitations ;)
Crack codewars and set the time limit to infinite.
No, seriously, this kata is not about math nor about coding, it's all about Wikipedia.
This comment is hidden because it contains spoiler information about the solution
it should be 6 kyu not 8!
Definitely is not a 8 kyu task.
JS. Unable to get past the infinity issue. Some solution use BigInt and memorization but a beginner wouldn't know this concept. I think this Kaya should be worth more. You can hard code the values in an OR. But that takes the fun out of it.
Brute-forcing will not pass the tests as there is a solution with O(1) complexity available (like you said)
Brute-force approach would not work as there is another mathematical approach in O(1) complexity
There is another method of solving instead of brute-forcing the equation
OP solved it, closing
Approved
Approved
I learned to optimize my arithmetic operations with the use gmpy2. (good to know)
And I learned to read extensively the problem description and follow instructions. (very useful)
I also learned abour Krunner-Dunning effect. (deja vu)
Not a kata issue, do some research on wilson primes using the link provided in the kata description.
Loading more items...