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.
Nice one! I've really gotta get better at that format string syntax!
This comment is hidden because it contains spoiler information about the solution
Very cool!
This comment is hidden because it contains spoiler information about the solution
You can't write a solution that runs faster than this tbh
Why doesn't this time out?
genius
This is good.
iteritems and itervalues don't even exist anymore in Python 3 (this is an old solution). But yes, values would be more efficient than items.
I didn't know this either. My code golf just leveled up.
You could make this a little more difficult by also accepting negative amounts (formatted correctly ;) and requiring the function to throw an error if the running total drops below zero.. it's fine for beginners though.
Yeah implementing the correct rounding is significantly harder than the actual task.
That does change difficulty level across languages.
I mainly meant efficient in the code golf sense of not requiring many characters. :) Yes, the floor division method is more performant.
This comment is hidden because it contains spoiler information about the solution
Loading more items...