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]
Denne nettleseren støttes ikke lenger.
Oppgrader til Microsoft Edge for å dra nytte av de nyeste funksjonene, sikkerhetsoppdateringene og den nyeste tekniske støtten.
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]