Maths Olympiad Prep

Library / /69 of 101

Number theory Difficulty 6.6 National olympiad Prove it Estonia

In an unopened pack, there are red, green and blue candies that weigh 22 g, 55 g and 2525 g respectively. There are the same number of candies of each color. After Mary eats some candies from that pack, the remaining candies weigh exactly 787787 g in total. Find the least number of candies that Mary could have eaten.

Solutions — 2

Solution 1

Let there be nn candies of each color in the unopened pack. Since one red, one green and one blue candy weigh 3232 grams in total, the total weight of all candies in the unopened pack is 32n32n grams. Therefore Mary eats 32n78732n - 787 or 32(n25)+1332(n - 25) + 13 grams of candies.

Note that if n=27n = 27, then Mary could have eaten 32(n25)+13=7732(n - 25) + 13 = 77 grams of candy by eating 33 blue and 11 red candy, for a total of 44 candies. We will show that this is the minimum possible number of candies by considering all possible cases:

* If n=25n = 25, then 32(n25)+13=1332(n - 25) + 13 = 13 grams can only be achieved by eating 11 green and 44 red candies, which is more than 44 candies.
* If n=26n = 26, then Mary ate 32(n25)+13=4532(n - 25) + 13 = 45 grams of candy. If Mary ate a blue candy, then the rest of the lighter candies had to weigh 4525=2045 - 25 = 20 grams. For that, at least 44 lighter candies are needed, since up to 33 lighter candies weighs at most 35=153 \cdot 5 = 15 grams. If Mary did not eat a blue candy, then she had to eat at least 99 lighter candies, since up to 88 lighter candies weighs at most 85=408 \cdot 5 = 40 grams. Either way, the amount of candies needed is greater than 44.
* If n=27n = 27, then Mary ate 32(n25)+13=7732(n - 25) + 13 = 77 grams of candy. If Mary ate 00, 11 or 22 blue candies, then the rest of the lighter candies had to weigh 7777, 5252 or 2727 grams respectively. In the last case, at least 66 lighter candies are needed, since up to 55 lighter candies weighs at most 55=255 \cdot 5 = 25 grams; in the first and second case even more lighter candies are obviously needed. Hence more than 44 candies would have been eaten.
* If n=28n = 28, then Mary ate 32(n25)+13=10932(n - 25) + 13 = 109 grams of candy, so she needed to eat more than 44 candies, since any 44 candies weigh at most 425=1004 \cdot 25 = 100 grams. If n>28n > 28, then the total weight of candies eaten is even greater and hence more than 44 candies had to be eaten.

Since in all cases at least 44 candies had to be eaten, 44 is the least number of candies that Mary could have eaten.

Solution 2

Since one red, one green and one blue candy weigh 3232 grams in total and there are the same amount of each color candies in the pack, the total weight of the candies is a multiple of 3232.

Suppose Mary ate kk candies. Note that k=4k = 4 is possible, since if there were 2727 candies of each color in the original pack, the total weight of the candies was 864864 grams and Mary could have eaten three blue candies and one red candy with a combined weight of 7777 grams, leaving 787787 grams of candy in the pack.

Let us show that kk cannot be less than 44.

* If k=1k = 1, then Mary would have eaten either one red, one green or one blue candy. In that case, the total weight of candies in the unopened back would have been 789789, 792792 or 812812 grams. Since none of these are divisible by 3232, they cannot be the original weight of the pack, so k=1k = 1 is not possible.
* If k=2k = 2, then Mary would have eaten either two red, two green, two blue, one red and one green, one green and one blue or one red and one blue candy. Then the original total weight of the candies would have been 791791, 797797, 837837, 794794, 817817 or 814814 grams respectively. Since none of these are divisible by 3232, k=2k = 2 is not possible either.
* If k=3k = 3, then Mary would have eaten either three red, three green, three blue, one red and two green, one red and two blue, one green and two red, one green and two blue, one blue and two red, one blue and two green, or one red, one green and one blue candy. Then the original total weight of the candies would have been 793793, 802802, 862862, 799799, 839839, 796796, 842842, 816816, 822822 or 819819 grams respectively. Since none of these is divisible by 3232, k=3k = 3 is not possible either.

Hence the least number of candies eaten is 44.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic and difficulty added by this site.