adventofcode/2023/02/Part2.pm

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;