A5. Consider the six-digit multiples of three with at least one of each of the digits 0 , 1 and 2 , and no other digits. What is the difference between the largest and the smallest of these numbers?
SolUTION
122208

Multiples of three have a digit sum which is divisible by three. The six-digit numbers we are considering must have the digits 0,1 and 2 occurring at least once. These three digits sum to 3 , which means the three remaining digits must also sum to a multiple of three. To create the largest possible number, we want to maximise the digits used from left to right. To create the smallest possible number, we want to minimise the digits used from left to right but the first digit must not be 0 or else the number does not have six digits. For the largest such six-digit number we can use another three digit $2 \mathrm{~s}$ and for the smallest we can use another three digits 0s. The largest possible number formed of the relevant digits is 222210 and the smallest possible number formed of the relevant digits is 100002 . The difference we want is $222210-100002=122208$.