summaryrefslogtreecommitdiff
path: root/problem32.ijs
blob: a0a7e9e8d20f2e24b85c52a9227abbe835ba1c0a (plain) (blame)
1
2
3
4
5
6
7
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