McNuggets problem: Difference between revisions

m
(→‎Python - List monad in parallel to comprehension: Pylinted, tidied, updated output, added {Works with} tag)
m (→‎{{header|Perl 6}}: Style tweaks)
Line 678:
return '∞' if 1 < [gcd] @counts;
 
my $min = [min] @counts;
my @meals;
my @min;
Line 686:
for 0..$b -> $c {
($a, $b, $c).permutations.map: {
for flat ($_ Z* @counts).rotor(3) {
@meals[ .sum $^first, $^second, $^third] = True
}
}
10,333

edits