This commit is contained in:
Gnieark 2015-11-20 16:33:54 +01:00
parent 57c910bac5
commit ab101ff7b9

12
euler16.php Normal file
View File

@ -0,0 +1,12 @@
<?php
/*
* Gnieark's anwser to euler problem 16
* https://projecteuler.net/problem=16
*/
$digits=str_split(gmp_pow(2,1000));
$sum=0;
foreach($digits as $digit){
$sum+=$digit;
}
echo $sum;