8. Egor wrote a number on the board and encrypted it according to the rules of letter puzzles (different letters correspond to different digits, the same letters correspond to the same digits). The result was the word "GUATEMALA". How many different numbers could Egor have initially written if his number was divisible by 30?
Solution. The letter A must equal 0. The remaining 6 letters are non-zero digits with a sum that is a multiple of 3. Note that each remainder when divided by 3 appears three times. By enumeration, we find all sets of remainders whose sum is a multiple of three: 000111, 000222, 111222, 001122. We count the 6-element subsets of digits: the first three types have one each, and the last type has \(3^3 = 27\). Each of these can be permuted in \(6!\) ways. In total: \(30 \cdot 6! = 21600\).

Criteria. It is shown that “A” equals 0 - 1 point. Combinations of the remaining letters are found by enumeration - do not deduct, but if cases are lost - no more than 3 points. Error in calculations -1 point. The answer is given as an expression, not fully calculated - also -1 point.

![](https://cdn.mathpix.com/cropped/2024_05_06_ec3ac6f86eddd7c278edg-4.jpg?height=277&width=294&top_left_y=113&top_left_x=161)

International Mathematical Olympiad

«Formula of Unity» / «The Third Millennium»

Year 2022/2023. Qualifying round

## Problems for grade R8

Each task is assessed at 7 points. Some problems have their own criteria (printed in gray).