Question
Mary has $3.00 in nickels, dimes, and quarters. If she has twice as many dimes as quarters and five more nickels than dimes, how many dimes does she have?
Answers
GPT 3.5
Call the number of quarters $Q$, the number of dimes $D$, and the number of nickels $N$. We have the system of equations \begin{align*}
0.05N+0.10D+0.25Q&=3 \quad \text{\eqref{eq:quartersnickelsdimes}}\\
D&=2Q \quad \text{\eqref{eq:dimes}}\\
N&=D+5. \quad \text{\eqref{eq:nickels}}
\end{align*}Substituting in \eqref{eq:dimes} and \eqref{eq:nickels} into \eqref{eq:quartersnickelsdimes} to eliminate $D$ and $N$, we get $0.05(D+5)+0.10(2Q)+0.25Q=3$. Expanding the equation yields $0.05D+0.25+0.20Q+0.25Q=3$, which yields $0.45Q+0.05D=2.75$. Thus, $9Q+D=55$ or $D=2.75-9Q$. Since quarters must be positive integers, the only possible values for $Q$ are $\{1,2,3,4,5,6\}$. Testing values for $Q$, it is clear that only $Q=\boxed{5}$ allows for the number of nickels and dimes to be positive integers.
0.05N+0.10D+0.25Q&=3 \quad \text{\eqref{eq:quartersnickelsdimes}}\\
D&=2Q \quad \text{\eqref{eq:dimes}}\\
N&=D+5. \quad \text{\eqref{eq:nickels}}
\end{align*}Substituting in \eqref{eq:dimes} and \eqref{eq:nickels} into \eqref{eq:quartersnickelsdimes} to eliminate $D$ and $N$, we get $0.05(D+5)+0.10(2Q)+0.25Q=3$. Expanding the equation yields $0.05D+0.25+0.20Q+0.25Q=3$, which yields $0.45Q+0.05D=2.75$. Thus, $9Q+D=55$ or $D=2.75-9Q$. Since quarters must be positive integers, the only possible values for $Q$ are $\{1,2,3,4,5,6\}$. Testing values for $Q$, it is clear that only $Q=\boxed{5}$ allows for the number of nickels and dimes to be positive integers.