Given 5 distinct digits from 1 to 9. Arnaldo forms the largest number possible using three of these 5 digits. Then, Bernaldo writes the smallest number possible using three of these 5 digits. What is the unit digit of the difference between Arnaldo's number and Bernaldo's number?

#
Solution

Let $a, b, c, d$, $e$ be the given digits in ascending order. Since any number with $e$ as the hundreds digit is greater than any number where the hundreds digit is one of the other four digits, then Arnaldo's number must start with $e$. Similarly, he should use the second largest digit in the tens place and the third largest in the units place. Therefore, Arnaldo's number is $\overline{e d c}$.

The same argument applies to the number written by Bernaldo, as any number with the digit $a$ in the hundreds place is smaller than any number where the hundreds digit is one of the other four digits. He should use the smallest digits in descending order, i.e., Bernaldo's number is $\overline{a b c}$. Since both numbers have the same units digit, subtracting them will yield a number that has zero as the units digit.

Note: The bar over the numbers serves to distinguish the product of digits from the number formed by them. For example, $a \cdot b$ denotes the product of $a$ and $b$ while $\overline{a b}$ denotes the number whose units digit is $b$ and the tens digit is $a$.