You are viewing a single comment's thread. Return to all comments →
F# solution
open System let rec gcd [ a; b ] = match a % b with | 0 -> b | rest -> gcd [ b; rest ] [<EntryPoint>] let main argv = Console.ReadLine().Split ' ' |> Array.toList |> List.map int |> List.sortDescending |> gcd |> Console.WriteLine 0
Seems like cookies are disabled on this browser, please enable them to open this website
Computing the GCD
You are viewing a single comment's thread. Return to all comments →
F# solution