Q: You have 4 jars of pills. Each pill is a certain weight, except for contaminated pills contained in one jar, where each pill is weight + 1. How could you tell which jar had the contaminated pills in just one measurement?
A: weight p1 + 2* p2 + 3*p3 + 4*p4
if the total weight is 10weight + i, the ith jar is contaminated.
Thursday, August 28, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment