adventofcode/2023/02/Part2.pm
2023-12-02 11:41:31 -05:00

18 lines
269 B
Perl

use 5.38.0;
package Part2;
use Part1;
use List::AllUtils qw/ min product sum /;
sub solution_2 ($input) {
sum
map { product $_->@{qw/ red blue green /}}
map { Part1::aggregate_entries($_) }
map { Part1::parse_line($_)}
split "\n", $input;
}
1;