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]
Não há mais suporte para esse navegador.
Atualize o Microsoft Edge para aproveitar os recursos, o suporte técnico e as atualizações de segurança mais recentes.
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]