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.
This was my least favorite kata of all time. I finished it out of spite. 99% of the work of this is not in the problem description. It's frustrating when you solve the test cases in 10 mins but in order to make the kata harder you just blow big numbers at it.
This kata is all about optimization, obscure math, and a little luck about the speed of your math libraries (of which I had none).
My suggestion would be to include hints about the math formulas needed or a warning against brute forcing it.
I think like a lot of people my code passed the initial test cases pretty quickly but the random tests cases gave system level errors. On a kata this low, I tend to think the system errors are bugs in the kata. I'd suggest buffing out the initial test cases or at least explain the system errors in the random tests are normal.
I had the same problem. Apparently there was an extra \n at the end. Deleted it and it passed.