7.4. Given nine cards with the numbers $5,5,6,6,6,7,8,8,9$ written on them. From these cards, three three-digit numbers $A, B, C$ were formed, each with all three digits being different. What is the smallest value that the expression $A+B-C$ can have?
# Answer: 149.

Solution. By forming the smallest sum of numbers $A$ and $B$, and the largest number $C$, we get the smallest value of the expression $A+B-C$. This is $566+567-988=145$. However, this partition is not valid: two numbers have the same digits. By swapping the digits 6 and 8 in the units place, we get the required partition: $568+567-986=149$. Why is this partition the best? With any other arrangement of the hundreds place digits, we will get a contribution from the hundreds place equal to 200, or 300, etc. In the tens and units places, we will get positive values because the sum of any two of the digits is greater than any third digit. Therefore, the number $A+B-C$ will be greater than 200. Thus, $A$ and $B$ start with the digit 5, and $C$ starts with the digit 9. Similarly, we find that the second digits of numbers $A$ and $B$ should be 6, and the second digit of $C$ should be 8. The units place has been discussed above.

Comment. The correct answer and an example of numbers $A, B, C$ without justification of minimality - 4 points.