The Wayback Machine - https://web.archive.org/web/20250116084011/https://www.geeksforgeeks.org/puzzle-10-identical-bottles-pills/
Open In App

Puzzle | 10 identical bottles of pills

Last Updated : 22 Jul, 2024
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Puzzle: Given 10 identical bottles of identical pills (each bottle contains 100 pills). Out of 10 bottles 9 have 1 gram of pills but 1 bottle has pills of the weight of 1.1 gram. Given a measurement scale, how would you find the heavy bottle? You can use the scale only once. 

Solution: 

  1. Step 1: Arrange the bottles on the shelf and now take, 1 pill from the first bottle, 2 pills from the second bottle, 3 pills from the third bottle, and so on.
  2. Step 2: In total, you’ll be taking 1 + 2 + 3 + … + 10 pills. This is a mathematical sequence that adds up to 55 pills (10 x 11 / 2) or normally if you’ll add up you’ll get 55 Pills.
  3. Step 3: If the weight reads exactly 55 grams, congratulations! All the bottles have pills of the correct weight. But If the weight is more than 55 grams, the difference indicates the bottle with the heavier pills.
    • For example, if the weight shows 55.1 grams, the extra 0.1 gram comes from the first bottle (since you took 1 pill from it).
    • Similarly, if the weight shows 55.2 grams, the second bottle has the heavier pills (because you took 2 pills from it).
    • Likewise if the weight shows 55.6 grams, the 6th bottle has the heavier pills (Since you too 6 pills from bottle 6) and so on.

References: http://www.crazyforcode.com/10-identical-bottles-pills/ 
 

Get 90% Course fee refund on completing 90% course in 90 days! Take the Three 90 Challenge today.

The next 90 Days of focus & determination can unlock your full potential. The Three 90 challenge has started and this is your chance to upskill and get 90% refund. What more motivation do you need? Start the challenge right away!


Next Article
Practice Tags :

Similar Reads

three90RightbarBannerImg