codingtests/ProjectEuler/048/solve.php
2011-04-24 16:22:52 +02:00

7 lines
132 B
PHP

<?php
define('MAX',1000);
$sum = 0;
for($c =1; $c <= MAX;$c++) {
$sum = bcadd($sum,bcpow($c,$c));
}
echo substr($sum,-10,10);