Added solution for ProjectEuler/025: php, ruby

This commit is contained in:
FuryFire
2012-03-30 11:15:23 +02:00
parent a858aaadda
commit 94dc7ec373
5 changed files with 83 additions and 25 deletions

View File

@ -0,0 +1,13 @@
<?php
define('DIGITS',1000);
$current = 1;
$prev = 1;
$term = 2;
while(strlen($current) < DIGITS) {
$term++;
$next = bcadd($current,$prev);
$prev = $current;
$current = $next;
}
echo $term;