Builidng Better Solutions For Web Development Recent WorkHow We Work
ProjectEuler.net
P1 | P2 | P3 | P4 | P5 | P6 | P7 | P8 | P9 | P10 | P22

Project Euler.net Answers

Problem 5

Solved on 2/29/2008

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 number that is evenly divisible by all of the numbers from 1 to 20?

$answer = 6;
$factor = array();
for ($i = 5; $i <= 20; $i++){
if($this->isPrime($i)) $answer = $answer*$i;
}
$answer = $answer * 2 * 2 * 2 * 3; // this will take care of the multiple factors
answer = 232,792,560

Latest News
Feb. 11, 2008
Wells Ideas Inc. launches their redesigned site.

The site is built on a symfony platform and utilizes client information from their project management site.
Quote Of The Day
"The greatest challenge to any thinker is stating the problem in a way that will allow a solution."
- Bertrand Russell