9 lines
167 B
PHP
9 lines
167 B
PHP
|
<?php
|
||
|
|
||
|
$masses = explode(',', file_get_contents('input.txt'));
|
||
|
|
||
|
echo array_sum(
|
||
|
array_map(function($mass) {
|
||
|
return floor($mass / 3) - 2;
|
||
|
}, $masses)
|
||
|
);
|