 T-1 Let $\mathbb{R}$ denote the set of real numbers. Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that $$ x f(x+x y)=x f(x)+f\left(x^{2}\right) f(y) $$ for all $x, y \in \mathbb{R}$. Solution. Setting $x=y=0$ in $$ x f(x+x y)=x f(x)+f\left(x^{2}\right) f(y) $$ we get $f(0)=0$. Using this in (0) with $y=-1$ we obtain $$ x f(x)+f\left(x^{2}\right) f(-1)=0 $$ Let us distinguish the cases $f(-1)=0$ and $f(-1) \neq 0$. The case $f(-1)=0$. It follows from (1) that $f(x)=0$ for all $x \neq 0$. As we already know, $f(0)=0$. Thus we get the zero function $f(x)=0$, which is obviously a solution. The case $f(-1) \neq 0$. Setting $x=-1$ in (1) yields $f(1)=1$. Using this in (1) with $x=1$, we get $f(-1)=-1$ and hence (1) can be transformed to $$ x f(x)=f\left(x^{2}\right) $$ Put now $y=x-1$ in (0) to get $$ x f\left(x^{2}\right)=x f(x)+f\left(x^{2}\right) f(x-1) $$ Summing up (2) and (3) we obtain the equation $$ f\left(x^{2}\right)(f(x-1)-(x-1))=0 $$ Assume that $f(a)=0$ for some $a \neq 0$. Then $f\left(a^{2}\right)=0$ by (2) and hence (0) with $x=a$ implies that $a f(a+a y)=0$, i.e. $f(a+a y)=0$. Since $y$ is arbitrary here, we get $f(-1)=0$, which is not the case. Therefore, for any $x \neq 0$ we have $f(x) \neq 0$, and hence $f\left(x^{2}\right) \neq 0$ as well. Thus (4) leads to the conclusion that $f(x-1)=x-1$ for any $x \neq 0$, i.e. $f(x)=x$ for any $x \neq-1$. Since we already know that $f(-1)=-1$, we get the identity function $f(x)=x$, which is obviously a solution. T-2 Let $n \geqslant 2$ be an integer. There are $n$ positive integers written on a blackboard. In each step we choose two of the numbers on the blackboard and replace each of them by their sum. Determine all values of $n$ for which it is always possible to get $n$ identical integers in a finite number of steps. Solution. Starting from the $n$-tuple $(2,2,1,1, \ldots, 1)$ with any $n \geqslant 3$, we get always an $n$-tuple in which the number of maximal values is even. Hence no odd $n \geqslant 3$ is as required. Let us show by induction that any even $n \geqslant 2$ is satisfactory, which is obvious if $n=2$. For an even $n \geqslant 4$, by the induction hypothesis, we can transform any initial $n$-tuple to $(a, a, \ldots, a, b, b)$. If $a \neq b$, we apply repeatedly some of the following series of steps, which always lead to an $n$-tuple of type $(\underbrace{a, \ldots, a}_{k}, \underbrace{b, \ldots, b}_{n-k})$ in which the number $k$ may differ from the initial value $k=n-2$ (remaining to be even): $$ \text { series } \alpha:(\underbrace{a, \ldots, a}_{k}, \underbrace{b, \ldots, b}_{n-k}) \rightarrow(\underbrace{2 a, \ldots, 2 a}_{k}, \underbrace{b, \ldots, b}_{n-k}), $$ $$ \begin{array}{r} \text { series } \beta:(\underbrace{a, \ldots, a}_{k}, \underbrace{b, \ldots, b}_{n-k}) \rightarrow(\underbrace{a, \ldots, a}_{k}, \underbrace{2 b, \ldots, 2 b}_{n-k}), \\ \text { series } \gamma_{1}(\text { if } k \leqslant n-k):(\underbrace{a, \ldots, a}_{k}, \underbrace{b, \ldots, b}_{n-k}) \rightarrow(\underbrace{a+b, \ldots, a+b}_{2 k}, \underbrace{b, \ldots, b}_{n-2 k}), \\ \text { series } \gamma_{2}(\text { if } k \geqslant n-k):(\underbrace{a, \ldots, a}_{k}, \underbrace{b, \ldots, b}_{n-k}) \rightarrow(\underbrace{a, \ldots, a}_{2 k-n}, \underbrace{a+b, \ldots, a+b}_{2(n-k)}) . \end{array} $$ To describe our procedure, we introduce the notation $c=2^{P(c)} N(c)$ for any positive integer $c$, where $P(c) \geqslant 0$ and $N(c)$ is odd. To each $n$-tuple $(\underbrace{a, \ldots, a}_{k}, \underbrace{b, \ldots, b}_{n-k})$ with $a \neq b$, let us apply $\triangleright$ series $\alpha$ if $P(a)
P(b)$,
$\triangleright$ series $\gamma_{1}$ or $\gamma_{2}$ if $P(a)=P(b)$ (and hence $N(a) \neq N(b)$ ).
Using the series $\alpha$ and $\beta$, the numbers $N(a), N(b)$ do not change, while the series $\gamma_{1}$ and $\gamma_{2}$ cause the changes exactly one of them, namely
$$
N(b) \rightarrow \frac{N(a)+N(b)}{2^{m}}, \quad \text { or } \quad N(b) \rightarrow \frac{N(a)+N(b)}{2^{m}} \quad \text { respectively }
$$
where $m=P(N(a)+N(b)) \geqslant 1$ and hence
$$
\frac{N(a)+N(b)}{2^{m}} \leqslant \frac{N(a)+N(b)}{2}<\max (N(a), N(b))
$$
(recall that $N(a) \neq N(b))$. Consequently, throughout our procedure, the value of $\max (N(a), N(b))$ is a nonincreasing variable, and hence constant after a finite numbers of series. From this moment, we must still have either $N(a) \geqslant N(b)$, or $N(a) \leqslant N(b)$. This excludes either series $\gamma_{1}$, or series $\gamma_{2}$ from future applications, in which, therefore, all possible changes of the parameter $k$ are either $k \rightarrow 2 k$, or $(n-k) \rightarrow 2(n-k)$. Since this can repeat only $r$ times, where $2^{r} \leqslant n$, at the end we always we get an $n$-tuple $(a, \ldots, a, b, \ldots, b)$ for which (if $a \neq b$ ) the continuation of our procedure reduces only to the series $\alpha$ and $\beta$. Applying now either $\alpha$, or $\beta$ exactly $|P(a)-P(b)|$ times, we get an $n$-tuple $\left(a^{\prime}, \ldots, a^{\prime}, b^{\prime}, \ldots, b^{\prime}\right)$ with $P\left(a^{\prime}\right)=P\left(b^{\prime}\right)$. Since $\gamma_{1}, \gamma_{2}$ are already excluded, we have $a^{\prime}=b^{\prime}$, which completes the induction proof.
Another solution (German team, adapted). We show without induction on $n$ that any even $n=2 k$ is satisfactory. At the beginning in the initial $2 k$-tuple $\left(a_{1}, \ldots, a_{2 k}\right)$ we replace every pair ( $a_{2 i-1}, a_{2 i}$ ) (for $\left.i=1, \ldots, k\right)$ by the pair $\left(a_{2 i-1}+a_{2 i}, a_{2 i-1}+a_{2 i}\right)$. From now on, we shall have always identical numbers on the $(2 i-1)$ th and $(2 i)$ th position. Hence because of brevity we shall work with $k$-tuples $(x, y, z, \ldots)$ instead of $2 k$-tuples $(x, x, y, y, z, z, \ldots)$. We are allowed to do the following transformations on the $k$-tuples:
$\triangleright$ choose two of the numbers $x, y$ and replace each of them by their sum (this corresponds with two steps $(\ldots, x, x, \ldots, y, y, \ldots) \rightarrow(\ldots, x+y, x, \ldots, x+y, y, \ldots) \rightarrow$ $(\ldots, x+y, x+y, \ldots, x+y, x+y, \ldots)$ performed on the $2 k$-tuple);
$\triangleright$ choose one number $x$ and multiply it by 2 (this corresponds with one step $(\ldots, x, x, \ldots) \rightarrow(\ldots, x+x, x+x, \ldots)$;
$\triangleright$ divide all numbers by 2 (this obviously does not affect anything; formally we could remember how many times we have performed this dividing and multiply all the numbers by the proper power of two at the end).
Our aim is to obtain $k$ identical numbers. We reach it by iterating the following algorithm:
1. While there are at least two odd numbers, find the minimum and the maximum odd number and replace each of them by their (even) sum.
2. If there is one odd number left after finishing the first step, multiply it by two.
3. Divide all numbers by 2 .
Clearly, after each iteration, the maximum number among all $k$ numbers either decreases or does not change. As this maximum is permanently a positive integer, after a finite number of iterations, it fixes at the value $M$ and does not change anymore. From now on, look at the number $N$ of $M$ 's in the $k$-tuple.
Obviously $M$ is odd (otherwise it would decrease in the third step in the next iteration). If $N