codingtests/solutions/ProjectEuler/013/solve.php

7 lines
153 B
PHP
Raw Normal View History

2012-03-08 13:52:32 +00:00
<?php
$numbers = file('php://stdin');
$total = 0;
foreach($numbers as $number) {
$total = bcadd($total,trim($number));
}
echo substr($total,0,10);