20
This commit is contained in:
parent
43c4410785
commit
a3d08a1584
12
euler20.php
Normal file
12
euler20.php
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* Gnieark's anwser to euler problem 20
|
||||||
|
* https://projecteuler.net/problem=20
|
||||||
|
*/
|
||||||
|
|
||||||
|
$digits=str_split(gmp_fact(100));
|
||||||
|
$sum=0;
|
||||||
|
foreach($digits as $digit)
|
||||||
|
$sum+=$digit;
|
||||||
|
|
||||||
|
echo $sum;
|
Loading…
Reference in New Issue
Block a user