Return to Snippet

Revision: 13478
at April 25, 2009 10:41 by cobra90nj


Initial Code
<?php
//project euler 16
//by cobra90nj

$pot    = bcpow(2,1000);
$loop   = $sum = 0;
$strpot = strlen($pot);

while ($loop < $strpot) {
	$sum += $pot{$loop};
	$loop++;
}

echo $sum;

Initial URL

                                

Initial Description

                                

Initial Title
Project Euler 16

Initial Tags

                                

Initial Language
PHP