/* Problem 5: What is the smallest positive number that is evenly

advertisement
/* Problem 5: What is the smallest positive number that is evenly divisible
by all of the numbers from 1 to 20?
No code is really necessary for this problem. By considering the prime
factors of the integers between 1 and 20, we can obtain the answer. We will
need four 2s because of 16, two 3s because of 9, and one each of the other
primes 5, 7, 11, 13, 17, and 19. Thus, the answer is
n = 2*2*2*2*3*3*5*7*11*13*17*19 = 232792560. */
Download