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

11 lines
No EOL
170 B
PHP
Executable file

<?php
$factorial = 1;
for($i = 100; $i > 0; $i--)
$factorial = bcmul($factorial, $i);
$sum = 0;
foreach(str_split($factorial) as $number)
$sum += $number;
echo $sum;