Created
September 9, 2015 02:04
-
-
Save ElemarJR/b821c81b0c17eb57602a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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