1
0
Fork 0
Project-Euler/PHP/16-a.php

10 lines
No EOL
127 B
PHP
Executable file

<?php
$POWER = 1000;
$sum = 0;
foreach(str_split(sprintf('%0.0f', pow(2, $POWER))) as $number)
$sum += $number;
echo $sum;