17 lines
236 B
Perl
17 lines
236 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::parse_line($_) }
|
|
split "\n", $input;
|
|
}
|
|
|
|
1;
|