Build up the set of weights one at a time.

The pharmacy will have to have a 1-gram weight, or else it will be impossible to weigh out exactly 1 gram.

If a 2-gram weight is added, then it becomes possible to weigh out either 2 or 3 grams, so any weight from 1 to 3 grams can be weighed out.

If a 4-gram weight is then added, then weights of 4, 5, 6, and 7 grams can also be measured out; the set now covers any weight from 1 to 7 grams.

Notice the pattern: add up all existing weights to find the maximum possible measured weight. Then, the next weight to be added is the first measure that can’t yet be covered. If you havea 1-gram, 2-gram, and 4-gram weights, then the maximum measured weight is 7 grams, so the next weight to add is 8 grams.

Adding that new weight will then allow you to measure every single weight up to the new total of all four weights. Once you add an 8-gram weight, you can measure up to 15 grams total.

Continue the pattern:

- A 16-gram weight, for weights up to 1 + 2 + 4 + 8 + 16 = 31 grams

- A 32-gram weight, for weights up to 31 + 32 = 63 grams

- A 64-gram weight, for weights up to 63 + 64 = 127 gram

- A 128-gram weight, for weights up to 127 + 128 = 255 grams

- Finally, another weight, weighing anywhere from 45 to 256 grams*

* The last one doesn’t have to follow the pattern because, this time, you only need to measure up to 300 grams total, not 255 + 256 = 511 grams. A weight of 256 grams will work, but so will any weight all the way down to the minimum needed to reach 300 (a weight of 45, because 255 + 45 = 300).

Therefore, the pharmacy needs a minimum of nine weights.

To prove that this is indeed the minimum, note that the total number of different gram weights that can theoretically be measured with a set of eight metal weights is 28 – 1 = 255. The 28 comes from the fact that each weight can be either present or absent, so there are eight separate decisions with 2 options each: 2 × 2 × 2 × 2 × 2 × 2 × 2 × 2 = 28. Finally, subtract 1 for the case in which all eight weights are absent, in which case you aren’t measuring anything (you’re measuring a weight of 0).

The first eight weights—chosen to measure any integer weight from 1 to 255 grams—are actually optimal; no better set can be found. Therefore, a ninth weight is necessary to reach 300 grams. One weight of 45 grams, for example, will allow you to measure 300 as well as any weight between 255 and 300. (The pattern above proves this—each new weight allows you to measure any integer weights up to the combined total for all weights—but, if you’re not sure, add up the weights needed to create 256, 257, and so on until you’ve convinced yourself.)

The correct answer is (C).

_________________

we shall fight on the beaches,

we shall fight on the landing grounds,

we shall fight in the fields and in the streets,

we shall fight in the hills;

we shall never surrender!