adventofcode/2023/02/Part2.pm

17 lines
236 B
Perl
Raw Permalink Normal View History

2023-12-01 18:03:18 +00:00
use 5.38.0;
package Part2;
use Part1;
2023-12-02 16:41:31 +00:00
use List::AllUtils qw/ min product sum /;
2023-12-01 18:03:18 +00:00
sub solution_2 ($input) {
2023-12-02 16:41:31 +00:00
sum
2023-12-02 18:32:51 +00:00
map { product $_->@{qw/ red blue green /} }
map { Part1::parse_line($_) }
split "\n", $input;
2023-12-01 18:03:18 +00:00
}
1;