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.
omg I'm not sure I could have figured that out....
let me try for a larger number, like 12.
The description clearly says:
And that's exactly why you do use the pair
unique_products
andproducer
in the result!Welp, for me tests say 7 should equal 3. :| Python
Kacpers hint is the key ;-)
Waiting for the effect takes 30 minutes. Taking a pill takes no time.
It doesn't make sense for me. He has 35 minutes, so why he can take four pills?
Would you elaborate?
That seems nonsensical to me. Haskell is lazy, so the
head
function should only evaluate the first element of the list. For example I can write something likehead ([2..] ++ [1])
, and it doesn't seem too slow.Though it may look cool, it adds
O(number of factors of n)
running time overhead (whereas empty-list check is a single operation).Avoid
++
ing at the end if you want a fast-running program.Not hard to do by hand, just eta conversion and infix <-> prefix notation.
Definitely not a best practice in terms of code clarity though! :D
Thank you! It's so satisfying to lay things out his way :)
it seems as though, the standard
if
should have been implemented like Data.Bool.Bool has beenNow it makes sense.
Having jars
A B C D E F G H
Andrzej can take pillsA B C D
first friend can take pillsC D E F
second friend can take pillsA C E G
@KacperKoban can you give an answer to this question that is not hidden(spoiler)
This comment is hidden because it contains spoiler information about the solution
Loading more items...