summaryrefslogtreecommitdiff
path: root/problem32.ijs
diff options
context:
space:
mode:
Diffstat (limited to 'problem32.ijs')
-rw-r--r--problem32.ijs8
1 files changed, 8 insertions, 0 deletions
diff --git a/problem32.ijs b/problem32.ijs
new file mode 100644
index 0000000..a0a7e9e
--- /dev/null
+++ b/problem32.ijs
@@ -0,0 +1,8 @@
+digits =: 10&#.^:_1
+pandigital =: (1+i.9) -: /:~
+validProd =: dyad define"0
+ prod =. x*y
+ prod*pandigital ;digits each x,y,prod
+)
+limit =: 2000 NB. Limit set to 2000 by experiment :)
+problem32 =: +/~.,validProd/~1+i.limit