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.
So, pieces that haven't been tampered with get priority when cutting. Confusing times.
No, not that leaf. An imaginary leaf, or a leaf from another twig. If you avoid negative numbers, you have basically modelled the thing such that leaves are not attached to specific twigs, and their sum total is calculated any time anything is cut. If there are no more leaves (imaginary or otherwise), then cutting a twig, branch or trunk will have no effect on their number (whcih remains 0), so in fact, you are not cutting the same leaf twice. The leaf isn't real.
If you cut a leave, then a twig, that leave is cut once more. This kata is messed up.
these dependencies make no sense at all
Aha - Thank you!
You have to return the result, not print it.
Python 3.4.3
This comment is hidden because it contains spoiler information about the solution
Ruby, Crystal and c++.
True, it could be edited to ensure that someone writing in Python 2 won't get an error out of nowhere like with one of my other translations...
ah well, now I remember the right context, I believe...: it's better to declare it with the
object
so that you might avoid problems if by any chances someone uses the code with python 2. Well, not really a concern on CW, I guess.x) Damn right! x)
But...
nope, it's the opposite
Loading more items...