AMC10 2021 10B, Problem 10

Forty slips of paper numbered $1$ to $40$ are placed in a hat. Alice and Bob each draw one number from the hat without replacement, keeping their numbers hidden from each other. Alice says, "I can't tell who has the larger number." Then Bob says, "I know who has the larger number." Alice says, "You do? Is your number prime?" Bob replies, "Yes." Alice says, "In that case, if I multiply your number by $100$ and add my number, the result is a perfect square. " What is the sum of the two numbers drawn from the hat?

Solution: Let Alice have the number A, Bob B. When Alice says that she can't tell who has the larger number, it means that $A$ cannot equal $1$. Therefore, it makes sense that Bob has $2$ because he now knows that Alice has the larger number. $2$ is also prime. The last statement means that $200+A$ is a perfect square. The three squares in the range $200-300$ are $225$, $256$, and $289$. So, $A$ could equal $25$, $56$, or $89$, so $A+B$ is $27$, $58$, or $91$, of only $\fbox{27}$ is an answer choice.

Answer: 27