Created
May 14, 2011 05:55
-
-
Save gnp/971961 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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? | |
---------- | |
2 = 2 | |
3 = 3 | |
4 = 2 * 2 | |
5 = 5 | |
6 = 2 * 3 | |
7 = 7 | |
8 = 2 * 2 * 2 | |
9 = 3 * 3 | |
10 = 2 * 5 | |
11 = 11 | |
12 = 2 * 2 * 3 | |
13 = 13 | |
14 = 2 * 7 | |
15 = 3 * 5 | |
16 = 2 * 2 * 2 * 2 | |
17 = 17 | |
18 = 2 * 3 * 3 | |
19 = 19 | |
20 = 2 * 2 * 5 | |
2 * 2 * 2 * 2 * 3 * 3 * 5 * 7 * 11 * 13 * 17 * 19 | |
$ perl -e 'print 2 * 2 * 2 * 2 * 3 * 3 * 5 * 7 * 11 * 13 * 17 * 19, "\n"' | |
232792560 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment