Finding the LCM of a range of numbers

前端 未结 14 731
时光说笑
时光说笑 2020-12-08 05:03

I read an interesting DailyWTF post today, \"Out of All The Possible Answers...\" and it interested me enough to dig up the original forum post where it was submitted. This

14条回答
  •  有刺的猬
    2020-12-08 05:45

    One-liner in Haskell.

    wideLCM = foldl lcm 1
    

    This is what I used for my own Project Euler Problem 5.

提交回复
热议问题