005 Smallest multiple.sf 402 B

123456789101112131415
  1. #!/usr/bin/ruby
  2. # Author: Daniel "Trizen" Șuteu
  3. # License: GPLv3
  4. # Website: https://github.com/trizen
  5. # 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.
  6. # What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?
  7. # https://projecteuler.net/problem=5
  8. # Runtime: 0.154s
  9. say Math.lcm(range(1,20)...);