Sort 15 Discussions, By:
Please Login in order to post a comment
I don't feel like this deserves to be in medium.
A minimal complete solution in Haskell is rather trivial
main = getLine >> getLine >>= print. foldr1 lcm. map read. words
will run without any problem using int's (on a 64bit system anyhow)
rather easy in Haskell where everything is in prelude (foldl1' lcm)