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

## 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 great 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

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

~ pi_is_3.14
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 35, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "https://artofproblemsolving.com/wiki/index.php?title=2021_AMC_12B_Problems/Problem_12&diff=prev&oldid=145598", "fetch_time": 1624238293000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2021-25/segments/1623488259200.84/warc/CC-MAIN-20210620235118-20210621025118-00312.warc.gz", "warc_record_offset": 118233970, "warc_record_length": 11826, "token_count": 474, "char_count": 1455, "score": 4.71875, "int_score": 5, "crawl": "CC-MAIN-2021-25", "snapshot_type": "latest", "language": "en", "language_score": 0.7576191425323486, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00063-of-00064.parquet"}