1. For which values of the parameters $p$ and $q$ does the equation

$$
\sqrt{x^{2} + p x + q} + x = 2017
$$

have more than 2017 different real solutions?
1. The given equation is equivalent to $\sqrt{x^{2}+p x+q}=2017-x$, from which we immediately have the condition $2017-x \geqslant 0$, i.e., $x \leqslant 2017$. Now we can square this equation, which gives us $x^{2}+p x+q=2017^{2}-4034 x+x^{2}$, i.e., $(p+4034) x=2017^{2}-q$. In the case $p+4034 \neq 0$ this equation has a unique solution (which does not suit us), so we are left with $p=-4034$. Then for $q \neq 2017^{2}$ we have a contradiction, while for $q=2017^{2}$ we have the correct expression $0=0$, so in that case the solutions are all values of $x$ that satisfy the given constraint $x \leqslant 2017$, i.e., the entire interval $(-\infty, 2017]$. Since it contains infinitely many points (and thus more than 2017), we conclude that the only values of the parameters $p$ and $q$ that satisfy the condition of the problem are $p=-4034$ and $q=2017^{2}$.