def most_efficient_cutting(bom): bom.sort() rem = 6000 for length in bom: if rem == length: rem = 0 elif rem != length: rem = rem - length return rem
16
7
6