1990 AMC 12 Problem 13

Attempt Problem 13 of the 1990 AMC 12 below, then check your answer against the professionally curated solution from LIVE by Po-Shen Loh. You can also try the full timed exam, view all 1990 AMC 12 solutions, or check the answer key.

All problems are used with official legal permission of the Mathematical Association of America (MAA).

13.

If the following instructions are carried out by a computer, which value of XX will be printed because of instruction 5?5?
1.1. START XX AT 33 AND SS AT 0.0.
2.2. INCREASE THE VALUE OF XX BY 2.2.
3.3. INCREASE THE VALUE OF SS BY THE VALUE OF X.X.
4.4. IF SS IS AT LEAST 10000,10000, THEN GO TO INSTRUCTION 5;5; OTHERWISE, GO TO INSTRUCTION 22 AND PROCEED FROM THERE.
5.5. PRINT THE VALUE OF X.X.
6.6. STOP.
1919
2121
2323
199199
201201
Answer: E
Concepts:algorithmarithmetic sequencesummation
Small hint:
After kk passes through instructions 22 and 3,3, find XX and SS
Big hint:
The values added to SS are consecutive odd numbers beginning with 55
Solution:
After kk passes, X=2k+3,X=2k+3, and S=5+7+⋯+(2k+3)=k(k+4). \begin{aligned} S&=5+7+\cdots+(2k+3)\\ &=k(k+4). \end{aligned} Now 98(102)=9996<10000,98(102)=9996\lt10000, while 99(103)=10197≥10000.99(103)=10197\ge10000. Thus the loop stops at k=99,k=99, when X=2(99)+3=201.X=2(99)+3=201.
Thus the correct answer is E.
LIVE by Po-Shen Loh
Programs

LIVE Classes

Self-Paced Classes

Stars

Scholarship

About Us

Who Is Po-Shen Loh?

Email Contact

Newsletter

Jobs

Become a Star

For a more Thought Full world.

© 2026 Expii, Inc.