VOOZH about

URL: https://www.geeksforgeeks.org/aptitude/puzzle-7-find-the-jar-with-contaminated-pills/

⇱ Puzzle | Find the Jar with Contaminated Pills - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Puzzle | Find the Jar with Contaminated Pills

Last Updated : 9 Apr, 2026

You are given five jars of pills, each containing the same number of pills. Every pill normally weighs 10 grams, but one jar contains contaminated pills that weigh 9 grams each. You are allowed to use a digital weighing scale only once.

👁 puzzle12

Check if you were right - full answer with solution below.

Solution:

Since we are allowed to use the weighing scale only once, we need to use a smart strategy rather than weighing each jar separately.

Step 1: Label the jars as Jar 1 to Jar 5.

Step 2: Take a different number of pills from each jar:

  • 1 pill from Jar 1
  • 2 pills from Jar 2
  • 3 pills from Jar 3
  • 4 pills from Jar 4
  • 5 pills from Jar 5

Step 3: Weigh all the selected pills together in one measurement.

If all pills were normal, the total weight would be 150 grams (15 × 10 g). Since one jar has pills that are 1 gram lighter, the actual weight will be less than 150 grams.

Step 4: Identify the jar

  • 149 g → Jar 1
  • 148 g → Jar 2
  • 147 g → Jar 3
  • 146 g → Jar 4
  • 145 g → Jar 5

Observation: The difference between 150 g and the measured weight directly tells the jar number containing contaminated pills.

👁 jar_2
Comment
Article Tags: