きったんの頭

Problem 5

pe5 :: Int -> Int
pe5 n
    | n < 2     = 1
    | otherwise = foldr1 lcm [2..n]

main :: IO()
main = print $ pe5 20