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