summaryrefslogtreecommitdiff
path: root/problem9.ijs
blob: 1f04358a0c4a9c829799cea84f6ae2ce95e96274 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
load 'stats'

allpairs=.1 + 3 comb 500 NB. 500 is the maximum value of c is about half of 1000
pairs=.(1000 = +/"1 allpairs)#allpairs

isPyth=. monad : 0
ab=.2{.y
c=.2}.y
(c^2) = +/ab^2
)

answerPair=.(;isPyth"1 pairs)#pairs
problem9=:*/;answerPair