There is a box full of apples, it has more than 80 but less than 85 apples in the box, some of the apples are red and the others are green, if you divide all the red apples in the box into groups of 4, 1 is left over.
After a while, one person came, took away more than 15 green apples and then ran away.
Then, another person came and checked the box, he wanted to match 1 red apple and 1 green apple as a pair, after he matched all the possible pairs, he finds out there are less than 13 red apples that can't be matched as a pair.
At this point, if he switches some of the red apples, the same number as of stolen green apples, to green, then only 2 red apples can't be matched as a pair.
If there are originally at least 37 red apples in the box, what is the original number of apples in the box?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Suppose there are x red apples, y green apples and n stolen green apples, then ⎩ ⎪ ⎨ ⎪ ⎧ 8 1 ⩽ x + y ⩽ 8 4 x ⩾ 3 7 n ⩾ 1 6 After n green apples were stolen, there are less than 13 red apples that can't be matched as a pair (because there are no more green apples left for the rest of the red apples to match), from this we can conclude y − n < x , x − ( y − n ) ⩽ 1 2 If 4 n red apples are switched to green, the number of unmatchable red apples should decrease by 2 n , we get x − ( y − n ) − 2 n = 2 x − ( y − n ) = 2 + 2 n ⩽ 1 2 1 6 ⩽ n ⩽ 2 0 Rewrite x − ( y − n ) ⩽ 1 2 as y − x ⩾ n − 1 2 ⩾ 4 , add it with y + x ⩾ 8 1 , you can get y ⩾ 4 2 . 5 or simply y ⩾ 4 3 .
From x − y ⩽ − 4 and x + y ⩽ 8 4 , we get x ⩽ 4 0 .
From x + y ⩽ 8 4 and x ⩾ 3 7 , we get y ⩽ 4 7 .
Thus, { 3 7 ⩽ x ⩽ 4 0 4 3 ⩽ y ⩽ 4 7
Since the number of red apples can be expressed as 4 k + 1 , then x − 1 must be a multiple of 4, therefore, x can only be 37.
Meanwhile, from the problem we can know that n is a multiple of 4, so the only possibilities for n is 16 or 20. Substitute n and x it in the equation x − ( y − n ) − 2 n = 2 you will get y = 4 3 , 4 5 Since x + y ⩾ 8 1 , thus y = 4 5 , n = 2 0 .
Therefore, the original number of apples in the box is x + y = 8 2 .