- or download this
use List::Util qw(sum);
use List::MoreUtils qw(first_index);
...
}
return \@b, \@numbers;
}
- or download this
perl funky.pl 400 402 521 735 758 191 307 679 776 877
Target is 2823
First container: sum(877 776 758 402) = 2813
Second container: sum(735 679 521 400 307 191) = 2833
- or download this
First container: sum(400 402 521 735 758) = 2816
Second container: sum(191 307 679 776 877) = 2830