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.
I used a mixture of maths and programming to get it to run in <1ms. I think it's running in O(Log(N))
This comment is hidden because it contains spoiler information about the solution
Try to do the hard work with maths. I got it working in < 1ms for larger numbers than the solution asks. You don't want to be looping through every number between 1 and the given number.
This comment is hidden because it contains spoiler information about the solution
It took me a week to get it, but it was so satisfying! I got it running in 172 microseconds on my PC for 1234567890.
There's a more efficient way to do it that's practically instantanious.
you can get it to run in under 1ms, but it took me about a week to figure out how.
Phew, that took me days to figure out! Got it running in 172 microseconds on my PC for 1234567890. It is possible (without cheating and hard-coding values). Lots of maths.