Scanf.scanf "%d" (fun n ->
    let t = Array.init n (fun _ -> Scanf.scanf " %d" (fun t -> t)) in
    let rec gcd a b = if b = 0 then a else gcd b (a mod b) in
    let lcm a b = a / gcd a b * b in

    let rec loop i acc =
        if i = n then acc else loop (i + 1) (lcm acc t.(i))
    in
    loop 1 t.(0) |> Printf.printf "%d\n"
)