Coins
This program calculates all combinations of coins yielding the specified amount. It's really slow.
coins:1 2 5 10 20 50 100 200
split:{[n]:[n=0;,!0;,/{x,/:split n-x}'coins@&~n<coins]}
?{x@<x}'split 20
This program calculates all combinations of coins yielding the specified amount. It's really slow.
coins:1 2 5 10 20 50 100 200
split:{[n]:[n=0;,!0;,/{x,/:split n-x}'coins@&~n<coins]}
?{x@<x}'split 20