Proof Techniques & Number Theory

Answer & solution
Official answer: 12
1. Method and setup. The powers-of-two sample sizes encode the heavy bags uniquely. Subtract the weight obtained if every selected coin were light; each heavy bag contributes exactly its sampled number of extra grams. The requested product uses bag labels, not the numbers of coins taken.
2. Work through the result and its assumptions. If all selected coins weighed10g, total weight would be 31×10=310g. The extra 13g has binary decomposition 13=1+4+8. Thus bags 1, 3, 4 contain 11g coins, and the product of labels is 1×3×4=12.