Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let test t =
- let a,b,c = t
- (a < b) && (b < c) && (a + b + c = 1000) && (a * a + b * b = c * c)
- let generator t =
- let x,y = t
- let x2 = x * x
- let y2 = y * y
- let a = 2 * x * y
- let b = x2 - y2
- let c = x2 + y2
- a,b,c
- let c n =
- [1..(n-1)]
- |> List.chunkBySize 1
- |> List.map (fun x -> n,(List.item 0 x))
- let result =
- [1..20]
- |> List.map c
- |> List.concat
- |> List.map (fun x -> (
- generator x
- ))
- |> List.filter (fun x -> (
- test x
- ))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement