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 is clean i was thinking using the range function too
yep, but the inputs are too small in the test suite (at least when I posted this), so that worked with py3 too, while it's incorrect.
This is correct if you're using python 2 since it will use floordiv and not truediv.
This solution is actually wrong, due to potential floating point errors. See the fork.
Correct version here.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
That's definitively faster: O(1)
(More math than informatics, though)