3. In the decimal representation of a six-digit number $a$, there are no zeros and the sum of its digits is 18. Find the sum of all different numbers obtained from the number $a$ by cyclic permutations of its digits. In a cyclic permutation, all digits of the number, except the last one, are shifted one place to the right, and the last one is moved to the first place.
3. Solution. Case 1. The number $a=333333$. This number does not change under cyclic permutations, so it is the only one and the sum of the numbers is the number itself, that is, 333333.

Case 2. The number $a$ consists of three identical cycles of two digits each, for example, $a=242424$. Such numbers have two different cyclic permutations: 242424 and 424242, the sum of which is $666666=2 \cdot 333333$. For any other such number, we will get the same sum of its cyclic permutations: $151515+515151=666666$ and so on.

Case 3. The number $a$ consists of two identical cycles of three digits each, for example, $a=423423$. Such numbers have three different cyclic permutations: 423423, 342342, and 234234, the sum of which is $999999=3 \cdot 333333$. For any other such number, we will get the same sum of its cyclic permutations: $513513+351351+135135=999999$ and so on.

Case 4. All six cyclic permutations are different. Let $a=a_{5} \cdot 10^{5}+a_{4} \cdot 10^{4}+a_{3} \cdot 10^{3}+a_{2} \cdot 10^{2}+a_{1} \cdot 10+a_{0}$.

If we write out all its cyclic permutations in the same form, add the results, and regroup the terms, we get

$a_{5}\left(10^{5}+10^{4}+\ldots+1\right)+a_{4}\left(10^{5}+10^{4}+\ldots+1\right)+\ldots+a_{0}\left(10^{5}+10^{4}+\ldots+1\right)=$ $=\left(a_{5}+a_{4}+a_{3}+a_{2}+a_{1}+a_{0}\right)\left(10^{5}+10^{4}+\ldots+1\right)=18 \cdot 111111=1999998$