You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
190 B
PHP

<?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;