Project Euler‎ > ‎

Problem in 5 F#

posted Aug 27, 2009, 1:17 AM by Peter Henell
let rec divisible n =   
let divbyall20 k
=
let lista
= Seq.map (fun x -> k % x ) {1..20}
if (Seq.sumByInt (fun x -> x) lista) = 0 then true
else false
if divbyall20 n then n
else divisible (n + 20)

printf
"Problem 5: %d\n" (divisible 20)
Comments