Floor function bounding From CMC:

What is the sum of the square of the real numbers $x$ for which $x^2 - 20\lfloor x\rfloor + 19 = 0$?

We use $\lfloor x\rfloor\le x<\lfloor x\rfloor+1$ and eventually get the bounds $1\le x\le19$ and $x\ge 18,x\le 2.$ Of course, it's possible for $x$ not to be an integer, so how do we find the other solutions, other than $19$ and $1$?
Someone wrote this solution:

$x^2 - 20\lfloor x \rfloor + 19 = 0$
Cleary $x\geq \lfloor x \rfloor$ for all real $x$. Thus,
$$x^2-20x+19 \leq x^2 - 20\lfloor x \rfloor + 19=0.$$
Which leads to
$$1 \leq x \leq19.$$Also $x^2=20\lfloor x\rfloor - 19$ which implies $\lfloor x \rfloor=1,17,18,19$.

I'm not sure how we get $\lfloor x\rfloor=17,18$ from this.

$$x^2 - 20 \lfloor x \rfloor  + 19 = 0$$
The intuition is that the solutions does not get too far away from the solutions of $x^2-20x+19=0$, namely $x=1, 19$. So go ahead and express that intuition!
I am not used to fiddling with $x-1 < \lfloor x \rfloor \le x$. So let's go for a more granular method.
Let $n = \lfloor x \rfloor , u = x-n$. So $0\le u < 1$. $$(n+u)^2 - 20n + 19=0.$$ Expanding we get $$u^2 + 2nu + (n^2-20n + 19)=0.$$ We know that $u \in [0,1)$. So this equation got to have a solution in that interval. Will it have two? it would mean that the sum of these two solutions is greater than 0. But from Vieta's theorem it is not possible. Therefore, there is exactly 1 solution in the interval $[0,1)$. If that solution is exactly 0, then $0^2 + 2n\cdot 0 + (n^2-20n+19)=0.$ So $n = 1,19$. If not, we see that the function $f_n(u) = u^2 + 2nu + (n^2-20n + 19)$ must change sign exactly once on the interval $(0,1)$. So $f(0)f(1) < 0.$ That means $$(n^2-20n+19)(n^2-18n + 20)<0,$$ which we can factor: $$(n-19)(n-1)(n-1.1897..)(n-16.8102..) < 0.$$ (In practice you don't need that much precision, you just need to calculate the integral part.) Since $n$ is an integer, $n=17, 18.$ (Can you see why? I shall explain that further on request.)
Substituting $n=17$ and $n=18$, we get equations for $u$ respectively. And this becomes regular quadratic equations.
