Count the coins: Difference between revisions
Content added Content deleted
Drkameleon (talk | contribs) No edit summary |
|||
Line 277: | Line 277: | ||
=={{header|Arturo}}== |
=={{header|Arturo}}== |
||
⚫ | |||
{{trans|Python}} |
|||
ways: map 0..amount+1 [x]-> 0 |
|||
⚫ | |||
ways: |
ways\0: 1 |
||
ways.0: 1 |
|||
loop coins |
loop coins 'coin [ |
||
loop coin..amount |
loop coin..amount 'j -> |
||
ways |
set ways j (get ways j) + get ways j-coin |
||
⚫ | |||
} |
|||
⚫ | |||
⚫ | |||
} |
|||
⚫ | |||
⚫ | |||
] |
|||
⚫ | |||
⚫ | |||
{{out}} |
|||
⚫ | |||
<pre>242 |
|||
13398445413854501 |
|||
</pre> |
|||
=={{header|AutoHotkey}}== |
=={{header|AutoHotkey}}== |