Back

Confused Bank Teller

Medium
Created: November 2, 2025

When Dorothy went to cash in a cheque, the confused bank teller swapped the dollars and cents. He gave her dollars in place of cents, and cents in place of dollars. Dorothy, also equally absent-minded, didn’t notice this. After purchasing a newspaper for 50 cents, she noticed that she was left with exactly three times as much money as the original cheque. What was the amount on the original cheque?

Solution

$18.56.

Let’s represent the original cheque’s dollars and cents as ddd and ccc respectively. This places the value of the original cheque at 100d+c100d + c100d+c.

The amount of money Dorothy got instead is 100c+d100c + d100c+d. After spending 50 cents, she should have 100c+d50100c + d - 50100c+d50 left. At this point, since she has 3 times as much as the original, we get the following equation:

3(100d+c)=100c+d50300d+3c=100c+d50299d97c+50=0\begin{align*} 3(100d + c) &= 100c + d - 50 \\ 300d + 3c &= 100c + d - 50 \\ 299d - 97c + 50 &= 0 \end{align*}3(100d+c)300d+3c299d97c+50=100c+d50=100c+d50=0

Normally, we can’t solve this system of 2 variables with only 1 equation by itself, but we have the following constraint: ccc and ddd must be non-negative integers less than 100.

From this point, we can guess some values of ccc and ddd until we come to the answer of c=56c=56c=56, d=18d=18d=18. Hence the amount on the original cheque is $18.56 and she got $56.18 instead.

Extra Credit: Solving the equation with number theory

Let’s consider the equation in mod 97 to get rid of ccc:

299d97c+500(mod97)8d+500(mod97)8d+50+470+47(mod97)8d47(mod97)\begin{align*} 299d - 97c + 50 &\equiv 0 \pmod{97} \\ 8d + 50 &\equiv 0 \pmod{97} \\ 8d + 50 + 47 &\equiv 0 + 47 \pmod{97} \\ 8d &\equiv 47 \pmod{97} \end{align*}299d97c+508d+508d+50+478d0(mod97)0(mod97)0+47(mod97)47(mod97)

To solve this, we can use the extended Euclidean algorithm to find the multiplicative inverse of 8—that is to say, what number multiplied by 8 gives 1 (mod 97).

8d1(mod97)8d+97y=1 (we now work in the integers)97=8(12)+1 (extended Euclidean algorithm)8(12)+97=18(12)1(mod97)8851(mod97)88547147(mod97)81847(mod97)\begin{align*} 8d &\equiv 1 \pmod{97} \\ 8d + 97y &= 1 \text{ (we now work in the integers)} \\ 97 &= 8(12) + 1 \text{ (extended Euclidean algorithm)} \\ 8(-12) + 97 &= 1 \\ 8 \cdot (-12) &\equiv 1 \pmod{97} \\ 8 \cdot 85 &\equiv 1 \pmod{97} \\ 8 \cdot 85 \cdot 47 &\equiv 1 \cdot 47 \pmod{97} \\ 8 \cdot 18 &\equiv 47 \pmod{97} \end{align*}8d8d+97y978(12)+978(12)885885478181(mod97)=1 (we now work in the integers)=8(12)+1 (extended Euclidean algorithm)=11(mod97)1(mod97)147(mod97)47(mod97)

Hence,

d18(mod97)d=97n+18 for any integer n\begin{align*} d &\equiv 18 \pmod{97} \\ d &= 97n + 18 \text{ for any integer } n \end{align*}dd18(mod97)=97n+18 for any integer n

This gives us the only solution of d=18d=18d=18, since any other value of nnn gives a result outside of the range of 0 to 99. Substituting d=18d=18d=18 into the original equation, we get c=56c=56c=56.

Try These Next