adventofcode/2017/day2/day2.pl

8 lines
129 B
Perl
Raw Permalink Normal View History

2017-12-03 17:06:46 +00:00
#!/usr/bin/perl
use 5.20.0;
use List::AllUtils qw/ minmax sum pairmap /;
say sum pairmap { -$a, $b } map { minmax split } <>;