Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Solution to problem 5 - least common multiple.

  • Loading branch information...
commit 4047916fdeadc57a66ed8307eca176b0d1885078 1 parent 4381807
@tdl authored
Showing with 8 additions and 1 deletion.
  1. +3 −1 problem_004.rb
  2. +5 −0 problem_005.rb
View
4 problem_004.rb
@@ -8,4 +8,6 @@ def p4
end
end
max
-end
+end
+
+puts p4
View
5 problem_005.rb
@@ -0,0 +1,5 @@
+def p5
+ (1..20).inject(&:lcm)
+end
+
+puts p5
Please sign in to comment.
Something went wrong with that request. Please try again.