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 comment is hidden because it contains spoiler information about the solution
Thanks :D
If the next small gift is beyond the specified distance from the current gift, but still closer to your home base than the nearest gift on the opposite side, proceed to collect it.
a is at a distance of 3.
b and z are at a distance of 7.
So z is beyond the 2*3=6 max distance.
And z is not closer to the base than b.
But the test expects us to grab it as well since the expected result is
zab
Am I missing something?
This comment is hidden because it contains spoiler information about the solution
I wanted to do it without using string :D
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
To simplify, I just prepare a list of prime numbers instead of checking every integer.
That's pretty much it.
Indeed, I really got too used to lazy_static.
True, self.juices should be emptied if everything is poured out (amount >= self.amount).
Maybe that's just me but I have no idea what's asked.
Ah, hence the inline.
I was wondering what it was for, thanks :)
I guess the compiler automatically changes 21**n in the result.
The total of the resulting list doesn't really adds up to 360, just close to it.
The tests sometimes throw an exception:
I cheated and bypassed the kata security to use the random module. :)
Loading more items...