第 970 题:(2024 AMC 10a, 15; 2024 AMC 12a, 9)
Let $M$ be the greatest integer such that both $M+1213$ and $M+3773$ are perfect squares. What is the units digit of $M$?
$\textbf{(A)}\ 1\qquad\textbf{(B)}\ 2\qquad\textbf{(C)}\ 3\qquad\textbf{(D)}\ 6\qquad\textbf{(E)}\ 8$
- $M+3773=q^2$, $M+1213=p^2$: $(q-p)(q+p)=2560$, both factors even.
- $M=p^2-1213$ is largest when $p$ is largest, i.e.\ $q-p=2$, $q+p=1280$, $p=639$.
- $M=639^2-1213=408321-1213=407108$, with units digit $8$. The answer is (E).
Let $M$ be the greatest integer such that both $M+100$ and $M+500$ are perfect squares. What is $M$?