Microsoft
Company
Programming
Technical
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?
Read Solution (Total 1)
-
- Take 1 pill from 1st jar, 2 pills from 2nd jar, 3 pills from 3rd jar and 4 pills from 4th jar.
Let X be the weight of each pill and X+1 will be the weight of contaminated pill.
Then calculate the total weight. If all the jar contain good pills, then total weight must be X+2X+3X+4X = 10X.
If the weight is 11X, then jar 1 contain contaminated pills.
If the weight is 12X, then jar 2 contain contaminated pills.
If the weight is 13X, then jar 3 contain contaminated pills.
If the weight is 14X, then jar 4 contain contaminated pills. - 12 years agoHelpfull: Yes(51) No(1)
Microsoft Other Question