Using numbers 1-9 to form three 3-digit numbers. Make the sum close to 1500. Every number (1-9) can be used just once.
Using a-i for 1-9. The sum is
sum = 100 * (a + b + c) + 10 * (d + e + f) + (g + h + i)
= 100 * (a + b + c) + 10 * (d + e + f) + (45 - a - b - c - d - e - f)
= 99 * (a + b + c) + 9 * (d + e + f) + 45
The sum is a multiple of 9. The closest possible number is 1503. This does not mean it is the best answer. If we cannot find a way to get 1503, we can try next, 1494, 1512, etc.
99 * (a + b + c) + 9 * (d + e + f) + 45 = 1503
11 * (a + b + c) + (d + e + f) = 162
下面是一组解答
216+538+749 = 1503