From 9ba8dae9508719aec8c319a0893276c20fdf7e12 Mon Sep 17 00:00:00 2001 From: Peter Mikkelsen Date: Fri, 27 Aug 2021 18:13:37 +0200 Subject: Problem 31 --- problem31.ijs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 problem31.ijs (limited to 'problem31.ijs') diff --git a/problem31.ijs b/problem31.ijs new file mode 100644 index 0000000..f26696d --- /dev/null +++ b/problem31.ijs @@ -0,0 +1,10 @@ +pick =. dyad define + if. 0=#y do. + x=0 + else. + coin =. {. y + newCoins =. }. y + +/([:pick&newCoins x-coin*])"0 i.>:<.x%coin + end. +) +problem31 =: 200 pick 200 100 50 20 10 5 2 1 -- cgit v1.2.3