• + 0 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