Solved ProjectEuler/013: php, ruby

This commit is contained in:
FuryFire
2012-03-08 14:52:32 +01:00
parent edf0ad8674
commit 53aa74bfb8
4 changed files with 137 additions and 0 deletions

View 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);