sandbox-php/PE3.php
2023-01-22 13:35:35 -05:00

17 lines
154 B
PHP

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