Count the coins: Difference between revisions
Content deleted Content added
Line 1,594: | Line 1,594: | ||
(\x a -> |
(\x a -> |
||
let (l, r) = splitAt x a |
let (l, r) = splitAt x a |
||
in fix ( |
in fix ((<>) l . flip (zipWith (+)) r)) |
||
(1 : repeat 0) |
(1 : repeat 0) |
||
Line 1,605: | Line 1,605: | ||
, ([100, 50, 25, 10, 5, 1], 10000) |
, ([100, 50, 25, 10, 5, 1], 10000) |
||
, ([100, 50, 25, 10, 5, 1], 1000000) |
, ([100, 50, 25, 10, 5, 1], 1000000) |
||
] |
] |
||
</lang> |
|||
{{Out}} |
{{Out}} |
||
<pre>242 |
<pre>242 |