🎉 Hello world

This commit is contained in:
2019-12-06 14:32:52 +01:00
commit 4cefe61056
7 changed files with 224 additions and 0 deletions

9
day_1/part_1.php Normal file
View File

@@ -0,0 +1,9 @@
<?php
$masses = explode(',', file_get_contents('input.txt'));
echo array_sum(
array_map(function($mass) {
return floor($mass / 3) - 2;
}, $masses)
);