Problem 2. The distance between the roots of the quadratic trinomial $x^{2}+p x+q$ is 1. Find the coefficients $p$ and $q$, given that they are prime numbers.

Answer: $p=3, q=2$.
Solution. The square of the distance between the roots of the quadratic polynomial is

$$
\left|x_{1}-x_{2}\right|^{2}=x_{1}^{2}+x_{2}^{2}-2 x_{1} x_{2}=\left(x_{1}+x_{2}\right)^{2}-4 x_{1} x_{2}=p^{2}-4 q=1
$$

from which we get $(p-1)(p+1)=4 q$. Both factors on the left side are even, and one of them is divisible by 4, so $4 q$ is divisible by 8. Since $q$ is prime, $q=2$, from which $p=3$.

Answer to variant 2: $x_{1}=1, x_{2}=2$.