# A Remainder and Division Problem

I have a question related to remainder and denominator of a division.

abc12 is a five-digit number and xy is a two-digit number. And the division is given as below: (xy is remainder, 40 is denominator, abc12 is dividend.)

What is the sum of all possible values of xy two-digit numbers?

Thank you.

• I am not familiar with this layout of the division. Presumably one of $xy$ and $40$ is the divisor and one is the remainder. Which is it? Is it $40 \cdot k + xy=abc12$ or $xy \cdot k+40=abc12?$ where $k$ can have multiple digits. – Ross Millikan Feb 7 '17 at 18:55
• 40⋅k+xy=abc12 is correct. xy is remainder, 40 is denominator, abc12 is dividend. – layout789 Feb 7 '17 at 18:57

Note that $abc12$ and $40$ are both divisible by $4$, so $xy$ must be as well. If we call the quotient $k$ we have $40 \cdot k+xy=abc12$. The ones digit of $40 \cdot k$ must be zero, so $y=2$. We must also have $x \le 3$, so the only possibilities are $xy=12,32$ Now we need to find $abc$s to show that both of these are possible. We have $40012=40 \cdot `1000 +12$ and $40112=40 \cdot 1002+32$.

• Your solution does not explain why xy=22 is impossible. – layout789 Feb 7 '17 at 19:06
• Because it is not divisible by $4$. Similarly for $02$ if we would otherwise allow $x$ to be zero. – Ross Millikan Feb 7 '17 at 19:09
• @layout789 It is much clearer and easier using modular arithmetic - see my answer. – Bill Dubuque Feb 7 '17 at 19:56

$\dfrac{abc12}{40}=\dfrac{abc\times 100}{40}+\dfrac{12}{40}$

Therefore, $xy=20\left[\text{remainder of }\dfrac{5(abc)}{2}\right]+12$

When abc is even,

$xy= 20 \times 0 + 12 = 12$

When abc is odd,

$xy= 20 \times 1 + 12 = 32$

${\rm mod}\ 40\!:\ \underbrace{1000}_{\large \equiv\ 0}AB\!+\!\underbrace{100}_{\large\equiv\ \color{#0a0}{20}}C\!+\!12\equiv \color{#0a0}{20}\,\color{#c00}C\!+\!12\equiv \begin{cases} 20(\color{#c00}{2n\!+\!0})\!+\!12\equiv 12,\ \ {\rm for\ even}\ \ \color{#c00}C\\ 20(\color{#c00}{2n\!+\!1})\!+\!12\equiv 32,\ \ {\rm for\ \ odd}\ \ \color{#c00}C\end{cases}$