codingtests/solutions/ProjectEuler/029/solve.php
2024-07-01 13:49:44 +00:00

12 lines
234 B
PHP

<?php
define('A_START',2);
define('A_END',100);
define('B_START',2);
define('B_END',100);
for($a=A_START;$a<=A_END;$a++) {
for($b=B_START;$b<=B_END;$b++) {
$array[] = bcpow($a,$b);
}
}
echo count(array_unique($array));