Skip to content

Instantly share code, notes, and snippets.

@ElemarJR
Created September 9, 2015 02:04
Show Gist options
  • Select an option

  • Save ElemarJR/b821c81b0c17eb57602a to your computer and use it in GitHub Desktop.

Select an option

Save ElemarJR/b821c81b0c17eb57602a to your computer and use it in GitHub Desktop.
let inline solution n =
[1UL..(n - 1UL)]
|> List.filter (fun f -> (f % 3UL = 0UL) || (f % 5UL = 0UL))
|> List.sum
let rec iterate count =
if count > 0
then
System.Console.ReadLine()
|> (uint64)
|> solution
|> (printfn "%d")
iterate (count - 1)
iterate (System.Console.ReadLine() |> int)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment