A2. The nine digits 1, 2, 3, 4, 5, 6, 7, 8, and 9 are each used exactly once to write three three-digit numbers.

What is the smallest possible sum of the three numbers under the condition that in each of the three numbers, the middle digit is the largest?
A2 It is clear that the digits 1, 2, and 3 must be used as the first digits to keep the total sum as small as possible. Furthermore, we should place as many high digits as possible at the end. The digit 9 cannot be placed last, so the 9 must be placed in the middle of one of the numbers. But then we can immediately place the 8 right after it. This leaves 7 as the largest remaining digit. This 7 must also be placed in the middle, and we can immediately place the 6 after it. This leaves 5 as the middle digit of the last number, with 4 as the last digit. Adding these up results in 828.