7 lines
267 B
Text
7 lines
267 B
Text
(with v (for x in Range(1 n) project<Vector<ULong>>
|
|
(for y in Range(x n) do
|
|
(for z in Range(y n)
|
|
where (== (* z z) (+ (* y y) (* x x)))
|
|
do (append @projRes Vector<ULong>([x,y,z])))))
|
|
(textout "Pythagorean triples:\n" v))
|
|
}
|