Then putting $\lfloor x \rfloor =y$ and $x-\lfloor x \rfloor=z$ we have
$z^2+z-y^2+y-k=0$, where $y$ is an integer and $z\in [0,\,1)$.
Expressing $z$ in terms of $y$ yields
$z=\dfrac{-1\pm\sqrt{1+4(y^2-y+k}}{2}$.
Since $z\ge 0$, we have
$z=\dfrac{-1+\sqrt{1+4(y^2-y+k)}}{2}$
So $0\le \dfrac{-1+\sqrt{1+4(y^2-y+k)}}{2}<1$, or equivalently,
$0\le y^2-y+k<2$
If $x_1>x_2$ are two distinct non-negative roots of the given equation, then $y_1>y_2$. Indeed, since $\lfloor x_i \rfloor=y_i$ and $x_i-\lfloor x_i \rfloor =z_i$ $(i=1,\,2)$, we have $y_1\ge y_2$. Assume that $y_1=y_2$. In this case, by $z=\dfrac{-1+\sqrt{1+4(y^2-y+k}}{2}$, $z_1=z_2$ and so $x_1=x_2$. This is impossible.
Thus $y_1>y_2$. From $0\le y^2-y+k<2$, it follows that
$|y_1^2-y_1-y_2^2+y_2|<2$, or equivalently,
$(y_1-y_2)|y_1+y_2-1|<2$.
Note that $y_1,\,y_2$ are integers, and so $y_1-y_2\ge 1$. Then the last inequality shows that $|y_1+y_2-1|=0,\,1$.
For $|y_1+y_2-1|=0$: $y_1+y_2=1$ and hence $y_1=1,\,y_2=0$.
For $|y_1+y_2-1|=1$: $y_1+y_2=2$ and hence $y_1=2,\,y_2=0$. But these values do not satisfy $(y_1-y_2)|y_1+y_2-1|<2$.
Thus we see that if the given equation has two non-negative distinct roots $x_1>x_2$, then $\lfloor x_1 \rfloor=1,\,\lfloor x_2 \rfloor=0$. Hence,