Solved ProjectEuler/016: php, ruby

This commit is contained in:
FuryFire
2012-03-09 10:43:52 +01:00
parent 0dc93ee0ee
commit 58f1e0c541
4 changed files with 31 additions and 1 deletions

View File

@ -0,0 +1,7 @@
<?php
$num = bcpow(2,1000);
$sum = 0;
for($c =0; $c < strlen($num);$c++) {
$sum += $num[$c];
}
echo $sum;