Solved ProjectEuler/013: php, ruby
This commit is contained in:
7
ProjectEuler/013/solve.php
Normal file
7
ProjectEuler/013/solve.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
$numbers = file('php://stdin');
|
||||
$total = 0;
|
||||
foreach($numbers as $number) {
|
||||
$total = bcadd($total,trim($number));
|
||||
}
|
||||
echo substr($total,0,10);
|
Reference in New Issue
Block a user