~pmikkelsen/euler-j

b0f5f50412594a52fb276f03db1048bf626413b0 — Peter Mikkelsen 1 year, 11 months ago 115efe9
Fix problem 50
1 files changed, 3 insertions(+), 2 deletions(-)

M problem50.ijs
M problem50.ijs => problem50.ijs +3 -2
@@ 1,11 1,12 @@
solve =. monad define
solve =: monad define
	ns =. p:i._1 p: y
	for_length. |.I.y>+/\ns do.
		sums =. length+/\ns
		vals =. sums#~(y>sums)*.isPrime sums
		vals =. sums#~(y>sums)*.1 p: sums
		if. 0<#vals do.
			return. >./vals
		end.
	end.
)

problem50 =: solve 1e6