# 2021 AMC 10B Problems/Problem 19

## Problem

Suppose that is a finite set of positive integers. If the greatest integer in is removed from , then the average value (arithmetic mean) of the integers remaining is . If the least integer is is [i]also[/i] removed, then the average value of the integers remaining is . If the greatest integer is then returned to the set, the average value of the integers rises of . The greatest integer in the original set is greater than the least integer in . What is the average value of all the integers in the set

## Solution

Let the lowest value be L and the highest G, and let the sum be Z and the amount of numbers n. We have , , , and . Clearing denominators gives , , and . We use to turn the first equation into , which gives . Turning the second into we see and so the average is ~aop2014

## Solution 2

Let in increasing order. There are integers in this set.

The greatest integer in is , so we need to remove this and get the average as . There are total terms. Thus,

The least integer is Removing it, we have

Finally, adding back we have

Since the greatest integer in the original set is greater than the least integer in , we have

Substituting this into the third equation, we have Rearranging, this becomes

But the LHS of this equation is the same as the LHS of the first equation! Equating them, we have , which means

Let's plug into all of our previous equations. We have the following system:

We're asked to find the average of , which is Let's focus on the numerator. We can find by subtracting the second equation from the first, to get We can also find by subtracting the second equation from the third, to get

We also know to equal . So when we sum up our three values, we get

Therefore, the sum of the values is , and finding the average in terms we have

-PureSwag