# 6. Variant 1.

What is the largest root that the equation

$$
(x-a)(x-b)=(x-c)(x-d)
$$

can have if it is known that $a+d=b+c=2022$, and the numbers $a$ and $c$ are different?
Answer: 1011.

Solution. By expanding the brackets and combining like terms, we find $x=\frac{c d-a b}{c+d-a-b}$. Note that $c+d-a-b \neq 0$, because otherwise $c+d=a+b$, and considering the equality $a+d=b+c$, we would get $a=c$.

Considering that $d=2022-a, c=2022-b, x=\frac{2022^{2}-2022 a-2022 b}{2(2022-a-b)}=\frac{2022}{2}=1011$.