advent_of_code_2022/day_1/part_1.php

9 lines
158 B
PHP
Raw Permalink Normal View History

<?php
echo max(
array_map(
static fn($elf) => array_sum(explode("\n", $elf)),
explode("\n\n", file_get_contents('./input.txt'))
)
);