blob: 064ce737d1c3ebfc2e00775af3a55a15a0248763 (
plain) (
blame)
1
2
3
4
5
6
7
|
perimeter =: {{ x+y+%:(x^2)+y^2 }}
count =: monad define
pairs =. y=perimeter"0/~>:i.y
top =. <:/~i.y
+/,pairs*.top
)
problem39 =: >:{.\:count"0>:i.1e3 NB. Takes around 3-4 minutes to compute
|