Permalink
Browse files

Solution to problem 5 - least common multiple.

  • Loading branch information...
1 parent 4381807 commit 4047916fdeadc57a66ed8307eca176b0d1885078 @tdl committed Jan 24, 2012
Showing with 8 additions and 1 deletion.
  1. +3 −1 problem_004.rb
  2. +5 −0 problem_005.rb
View
@@ -8,4 +8,6 @@ def p4
end
end
max
-end
+end
+
+puts p4
View
@@ -0,0 +1,5 @@
+def p5
+ (1..20).inject(&:lcm)
+end
+
+puts p5

0 comments on commit 4047916

Please sign in to comment.