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.
wOw, looks pretty
what about it?
:o
I like to see everything in one line. But it's not good practice.
Wow! xD
Holy moly, what i've done, it was so simple
I think that n%3 mean that a number divide by 3 and what you want is the remainder. n//3%3 mean that you are diving the number dirst and rounding it down, then you are doinging another division and looking for it's remainder. Same with n//9%3 This just mean that you are dividing by 9 first and rounding down, then you divide by 3 and get the remainder.
For example;
5%3 would have a remainder of 2.
5//3%3 would be 1.66 and round down would have 1, then you find the remainder which is 1.
12//9%3 would be 1.33 and round down you get 1, then you find the remainder of 1/3 which is 1.
I mean how you are calculating the exact hands by dividing. I could think of three nested(one for each person ) for loops that gives me array of numbers, but I was failing to stop the 3 nested at exact hands given as input
In the table given in the kata description, observe that P1, P2, P3 are simply counting in ternary. So this kata is an exercise in converting a decimal integer to ternary.
Can you please explain this solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Modified description.
I don't understand how's this solution covers the '0!' case in which is suppose to be equal to 1.
Thanks for the correction, Steffan153
Loading more items...