> For the complete documentation index, see [llms.txt](https://maksimdan.gitbook.io/interview-practice-problems/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://maksimdan.gitbook.io/interview-practice-problems/coding_practice_questions/math_and_puzzles/the-heavy-pill.md).

# The Heavy Pill

**6.1 The Heavy Pill:** You have 20 bottles of pills. 19 bottles have 1.0 gram pills, but one has pills of weight 1.1 grams. Given a scale that provides an exact measurement, how would you find the heavy bottle? You can only use the scale once.

Place n = 1,2,3,... 20 bills respectively from bottles 1,2,3, ... 20 to bottles n+1 = 2,3,4 ... 20. This will give you a hash index into the bottled pill. weight - 210 / .1.
