# Difference between revisions of "2021 AMC 12B Problems/Problem 12"

The following problem is from both the 2021 AMC 10B #19 and 2021 AMC 12B #12, so both problems redirect to this page.

## Problem

Suppose that $S$ is a finite set of positive integers. If the greatest integer in $S$ is removed from $S$, then the average value (arithmetic mean) of the integers remaining is $32$. If the least integer in $S$ is also removed, then the average value of the integers remaining is $35$. If the greatest integer is then returned to the set, the average value of the integers rises to $40.$ The greatest integer in the original set $S$ is $72$ greater than the least integer in $S$. What is the average value of all the integers in the set $S?$

$\textbf{(A) }36.2 \qquad \textbf{(B) }36.4 \qquad \textbf{(C) }36.6\qquad \textbf{(D) }36.8 \qquad \textbf{(E) }37$

## Solution 1

Let $x$ be the greatest integer, $y$ be the smallest, $z$ be the sum of the numbers in S excluding $x$ and $y$, and $k$ be the number of elements in S.

Then, $S=x+y+z$

Firstly, when the greatest integer is removed, $\frac{S-x}{k-1}=32$

When the smallest integer is also removed, $\frac{S-x-y}{k-2}=35$

When the greatest integer is added back, $\frac{S-y}{k-1}=40$

We are given that $x=y+72$

After you substitute $x=y+72$, you have 3 equations with 3 unknowns $S,$, $y$ and $k$.

$S-y-72=32k-32$

$S-2y-72=35k-70$

$S-y=40k-40$

This can be easily solved to yield $k=10$, $y=8$, $S=368$.

$\therefore$ average value of all integers in the set $=S/k = 368/10 = 36.8$, D)

~ SoySoy4444

## Solution 2

We should plug in $36.2$ and assume everything is true except the $35$ part. We then calculate that part and end up with $35.75$. We also see with the formulas we used with the plug in that when you increase by $0.2$ the $35.75$ part decreases by $0.25$. The answer is then $\boxed{(D) 36.8}$. You can work backwards because it is multiple choice and you don't have to do critical thinking. ~Lopkiloinm

~ pi_is_3.14

~IceMatrix