How do I solve this Olympiad question with floor functions? 
Emmy is playing with a calculator. She enters an integer, and takes its square root. Then she repeats the process with the integer part of the answer. After the third repetition, the integer part equals 1 for the first time. What is the difference between the largest and the smallest number Emmy could have started with?
$$
\text{(A)} \; 229 \qquad
\text{(B)} \; 231 \qquad
\text{(C)} \; 239 \qquad
\text{(D)} \; 241 \qquad
\text{(E)} \; 254
$$

This was Problem 19 from the first round of the Norwegian Mathematical Olympiad, 2014–15.
I think the floor function applies well here.
The integer part obviously is the floor part of it. 
Let $x_1$ be the initial.
$x_2 = \left \lfloor{{\sqrt{x_1}}}\right \rfloor $
$x_3 = \left \lfloor{{\sqrt{x_2}}}\right \rfloor$
$x_4 = \left \lfloor{{\sqrt{x_3}}}\right \rfloor = 1$ <-- Last one.
So we need to find $b \le x_1 \le c$ such that $b$ is the smallest number to begin with and $c$ is the largest number to begin with.
$\sqrt{b} \le \sqrt{x_1} \le \sqrt{c}$

Clearly we must have $x_3<4$, $x_2<16$, and $x_1<256$, so the largest possible value of $x_1$ is $255$. Since $x_3>1$, we know that $x_3\ge 2$ and hence that $x_2\ge 4$. This implies that $x_1\ge 16$. Thus, the range is from $16$ through $255$, the difference being $239$.
