Skip to content

Instantly share code, notes, and snippets.

@tamurashingo
Created February 23, 2013 05:23
Show Gist options
  • Save tamurashingo/5018581 to your computer and use it in GitHub Desktop.
Save tamurashingo/5018581 to your computer and use it in GitHub Desktop.
Project Euler 5
{-
1~20で割りきれる最小の数 = 最小公倍数
-> 1と2の最小公倍数、その数と3の最小公倍数、その数と4の最小公倍数、...
-> reduceを使う。haskellだとfoldlとか。
-}
foldl lcm 1 [2..20]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment