Added first version of helper tool

This commit is contained in:
FuryFire
2012-03-15 13:12:02 +01:00
parent 823b0a332a
commit e99ce2c532
10 changed files with 92 additions and 12 deletions

View File

@ -0,0 +1,25 @@
<?php
function fac($number) {
if($number == 1)
return 1;
return $number * fac($number-1);
}
$result = array(0,0,0,0,0,0,0,0,0,0);
$endsteps = 1000000;
$cstep = 0;
$cdigit = 9;
while($cdigit != 0) {
do{
$result[9-$cdigit]++;
$cstep += fac($cdigit);
} while ($cstep < $endsteps) ;
echo "Done with $cdigit - steps:$cstep\n";
$cdigit--;
}
echo "DONE!";
print_r($result);
echo " - ".$cstep ."\n";
echo "Result: 2783915460";