II. (40 points) Find all real numbers $x$ that satisfy the equation
$$
\left[x^{2}-2 x\right]+[x]=[x]^{2} \text {, }
$$

where $[a]$ denotes the greatest integer not exceeding the real number $a$.
Let $[x]=u, x-[x]=\varepsilon(u \in \mathbf{Z}, 0 \leqslant \varepsilon < 1)$, then
$$
0 \leqslant (2 \varepsilon - 1) u + \varepsilon^2 - 2 \varepsilon < 1.
$$

Therefore, $\varepsilon \in \left(1-u-\sqrt{u^2-u+2}, 1-u-\sqrt{u^2-u+1}\right]$.
In summary, $x=0$ or $u+\varepsilon$, where, when $u \geqslant 2$, $\varepsilon$ satisfies equation (2); when $u<0$, $\varepsilon$ satisfies equation (3).