From a59b40cb74f4efd699ca73ec37cef9e9262ffc0b Mon Sep 17 00:00:00 2001 From: Peter Mikkelsen Date: Thu, 11 Nov 2021 19:57:08 +0100 Subject: Fix problem 31 --- problem31.ijs | 5 +++-- 1 file 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 -- cgit v1.2.3