2. Find all pairs of real numbers $a$ and $b$ such that for all real numbers $x$ and $y$ the equality

$$
\lfloor a x+b y\rfloor+\lfloor b x+a y\rfloor=(a+b)\lfloor x+y\rfloor \text {. }
$$

holds.

(For a real number $t$, $\lfloor t\rfloor$ denotes the greatest integer not greater than $t$.)
2. For $y=-x$, the given condition reduces to $\lfloor(a-$ $b) x\rfloor+\lfloor(b-a) x\rfloor=0$. If the numbers $a$ and $b$ were different, this would not be satisfied, for example, for $x=\frac{1}{2(a-b)}$ (then it would hold $\lfloor(a-b) x\rfloor+\lfloor(b-a) x\rfloor=\left\lfloor\frac{1}{2}\right\rfloor+\left\lfloor-\frac{1}{2}\right\rfloor=$

![](https://cdn.mathpix.com/cropped/2024_06_04_adcebcbe7d41887b6eefg-23.jpg?height=416&width=365&top_left_y=407&top_left_x=1151)

Op 20191 A 1 $0+(-1)=-1 \neq 0)$. Therefore, it must hold that $a=b$, and the condition of the problem becomes $\lfloor a(x+y)\rfloor=a\lfloor x+y\rfloor$. Choosing $0 \leqslant x+y<1$. Since for $0 \leqslant x+y<1$ it must hold that $\lfloor a(x+y)\rfloor=a\lfloor x+y\rfloor=0$, i.e., $0 \leqslant a(x+y)<1$, it follows that $x+y<\frac{1}{a}$; conversely, if we choose $0 \leqslant x+y<\frac{1}{a}$, the given condition reduces to $a\lfloor x+y\rfloor=\lfloor a(x+y)\rfloor=0$, from which it follows that $x+y<1$. In other words, the conditions $0 \leqslant x+y<1$ and $0 \leqslant x+y<\frac{1}{a}$ are equivalent, from which it follows that $a=1$.

Therefore, the only solutions are the pairs $(a, b)=(0,0)$ and $(a, b)=(1,1)$.

![](https://cdn.mathpix.com/cropped/2024_06_04_adcebcbe7d41887b6eefg-23.jpg?height=346&width=351&top_left_y=1286&top_left_x=192)

Op 2019 1A 3