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.
Too late to make such changes, it's a 7kyu after all, hence no restrictions required!
Too late to enforce! (There's another kata that does this)
This is what I was looking for. Amazing solution!
I can't tell the solution here. But think if you can first reduce the range. That would be the first optimization. And then see if you're seeing some mathematical pattern.
and how to do that?
Yes and by a lot
Yes.
This comment is hidden because it contains spoiler information about the solution
This problem can be cheesed easily with default libraries. I would suggest attempting this problem without using the Math library. Or else there's nothing there to learn from it.
I sincerely believe that there should be large cases that should only work with O(1) instead of O(n)