Sort 14 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)
Technically, foldl1' is in Data.List. Otherwise, I agree.
With F# ensure using int64 and printing out in int to pass all the testcases.