summaryrefslogtreecommitdiff
path: root/problem74.ijs
blob: 74c57e491d746781f5836f16c60ac3b51ab20e67 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
digits =: 10&#.^:_1
next =: +/@:!@:digits
loop =: monad define
	n =. next {. y
	if. n e. y do.
		#y
	else.
		loop (n,y)
	end.
)
problem74 =: +/60=loop"0 i.1e6 NB. Takes about a minute to compute