Task 2. Lёnya has cards with digits from 1 to 7. How many ways are there to glue them into two three-digit numbers (one card will not be used) so that their product is divisible by 81, and their sum is divisible by 9?
Answer: 36.

Solution. If one of the numbers is not divisible by 9, then the other is not either, since their sum is divisible by 9. But then the product cannot be divisible by 81, a contradiction. Therefore, both numbers are divisible by 9.

Then the sum of the digits in each number is divisible by 9, and thus the total sum of the used digits is also divisible by 9. The sum of all given digits $1+2+\ldots+7$ is 28. If we discard the digit 1, the remaining sum is 27, which is divisible by 9; discarding any other digit cannot result in a sum divisible by 9. Therefore, the digits used are 2, $3,4,5,6,7$.

Note that the smallest possible sum of three of these digits is $2+3+4=9$, and the largest is $5+6+7=18$. Other sums divisible by 9 cannot be obtained; 9 and 18 can only be obtained in one way. Thus, one number consists of the digits $2,3,4$, and the other of $5,6,7$.

There are six numbers that can be formed from the digits $2,3,4$, and six numbers that can be formed from the digits $5,6,7$. We need all possible pairs of these numbers.

## Criteria

Any complete solution to the problem is worth 7 points. In the absence of such a solution, the following criteria are summed:

1 point. It is proven that both numbers must be divisible by 9.

2 points. Assuming (possibly unjustified) that both numbers are divisible by 9, it is proven that the digit 1 is not used.

3 points. Assuming (possibly unjustified) that both numbers are divisible by 9 and the digit 1 is not used, it is proven that one number consists of the digits 2,3,4, and the other of $5,6,7$.

1 point. The previous is not proven but stated.