diff options
author | Peter Mikkelsen <petermikkelsen10@gmail.com> | 2021-08-27 18:32:22 +0200 |
---|---|---|
committer | Peter Mikkelsen <petermikkelsen10@gmail.com> | 2021-08-27 18:32:22 +0200 |
commit | 8519b1be179749f445eb72c49dee80a2b054553a (patch) | |
tree | f2f8a811e41fcceb8664688ef4fc7e0cae36f98c /problem32.ijs | |
parent | 9ba8dae9508719aec8c319a0893276c20fdf7e12 (diff) |
Problem 32
Diffstat (limited to 'problem32.ijs')
-rw-r--r-- | problem32.ijs | 8 |
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 |