• + 0 comments

    Haskell has an lcm function, so it's an easy solution

    main = do
        _ <- getLine
        nums <- map read . words <$> getLine
        print $ foldl lcm 1 nums