Project Euler problem 3.

This commit is contained in:
sweatshirt0 2023-01-22 13:35:35 -05:00
parent 354fa17588
commit 26e644bd53

16
PE3.php Normal file
View File

@ -0,0 +1,16 @@
<?php
$num = 600851475143;
$div = 2;
while ($num > 1) {
if (($num % $div) == 0) {
$num = $num / $div;
$div--;
}
$div++;
}
echo $div . "\n";
?>