summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--problem31.ijs5
1 files changed, 3 insertions, 2 deletions
diff --git a/problem31.ijs b/problem31.ijs
index f26696d..65a61f0 100644
--- a/problem31.ijs
+++ b/problem31.ijs
@@ -1,4 +1,4 @@
-pick =. dyad define
+pick =: {{
if. 0=#y do.
x=0
else.
@@ -6,5 +6,6 @@ pick =. dyad define
newCoins =. }. y
+/([:pick&newCoins x-coin*])"0 i.>:<.x%coin
end.
-)
+}}
+
problem31 =: 200 pick 200 100 50 20 10 5 2 1