codingtests/ProjectEuler/029/solve.php

12 lines
234 B
PHP
Raw Normal View History

2011-04-10 11:19:21 +00:00
<?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));