Project Euler Problem #6
Difference between sum of the squares and the square of the sum of 1 - 100:
(fun ns ->
let sqr x = x * x
(sqr (List.sum ns)) - (List.map sqr ns |> List.sum)
) [1..100]
Tätä selainta ei enää tueta.
Päivitä Microsoft Edgeen, jotta voit hyödyntää uusimpia ominaisuuksia, suojauspäivityksiä ja teknistä tukea.
Difference between sum of the squares and the square of the sum of 1 - 100:
(fun ns ->
let sqr x = x * x
(sqr (List.sum ns)) - (List.map sqr ns |> List.sum)
) [1..100]