Related sites: | site map |

# aiju.de Home of aiju

- › about me/
- › b/
- » code/
- - › RatJS
  - › homework/
  - » k/
  - - › cluster
    - » coins
    - › eratothenes
    - › euler phi
    - › feigenbaum
    - › fibonacci
    - › fsm
    - › molecule
    - › pascal
    - › qsort
    - › sierpinski
    - › tictactoe
  - › misc/
  - › pdp11/
- › donate
- › electronics/
- › legal
- › misc/
- › plan 9/

# 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