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.
This breaks at the example 10100000000 (timeout)
I thought the same, but big numbers might couse fault or exit :) Congrats.
Agreed. It was difficult determining for certain what was being asked for. I suggest something like the below wording at the end of the Task section:
The function should return the minimum number of socks that must be pulled out such that you are guaranteed at least
num_of_pa_want
pairs (of sizenum_of_soc_in_pair
) of matching socks.This comment is hidden because it contains spoiler information about the solution
I've made a translation which fixes the issue from here + corrects some spell mistakes (not all, but still). Anyone who has the permit to approve please kindly do that :)
No, there are only
5
types of colors in the drawer;44
is the amount of socks needed to form a 'pair', and50
is the amount ofpairs
we need to take out. The whole amount of socks in the drawer is infinite, which is stated in the problem descriptionMaybe I misunderstood something, but the number of pairs you want should not exceed the number of pairs that we have ( [5, 44, 50, 2372]) how can we get 50 pairs if there are only 5? Even if there was something else, how to get 2372 as a result if the total number of socks is 5*44=220?
You didn't even mention anywhere in this kata what should the function return, only what it recieves.
Yes Harvard, this man right here.
Wow
plus 9 is quite clever
Maybe the random tests should be 50-50 True-False not
Passed: 780 Failed: 220
just returning FalseLOL. I never would have thought that it would pass all tests in the prescribed time)
Yeah, I did that! took some time to observe this though after first attempt(using itertools permutations) timed out on larger numbers.
Loading more items...