Consider $k$ such that $k^2<n<(k+1)^2$. Then $\lfloor n\rfloor=k$ and $n=k^2+i$, $1\leq i\leq 2k$. We get the following:
$$k^3|(k^2+i)^2\Leftrightarrow k^3|k^4+i(2k^2+i)\Leftrightarrow k^3|i(2k^2+i)$$
$\text{If }k>1$
Consider a prime $p$ that divides $k$ and let $v_p(k)$ the exponent of $p$ in the factorisation of $k$. We must have $$v_p(k^3)\leq v_p(i(2k^2+i))\Leftrightarrow3\cdot v_p(k)\leq v_p(i)+v_p(2k^2+i)$$ Suppose $v_p(i)\leq v_p(k)$. Then, obivously, $v_p(2k^2+i)=v_p(i)$ so $v_p(i)+v_p(2k^2+i)\leq 2\cdot v_p(k)$, which would lead to $3\cdot v_p(k)\leq2\cdot v_p(k)$ which is a contradiction ($p$ divides $k$ so $v_p(k)\geq 1$).
Thus, for any $p $that divides $k$, $v_p(i)>v_p(k)$ so $k|i$ and $k\neq i$. However, $i\leq 2k$, so this implies $i=2k$ (so $n=k^2+2k$) which gives us $$k^3|2k(2k^2+2k)\Leftrightarrow k^3|4k^3+4k^2\Leftrightarrow k^3|4k^2 \Leftrightarrow k|4$$
Thus, just check cases $k=2,4$, which give $n=8,24$
$\text{If }k=1$
Then this gives us $n=2,3$ and again, just check those cases.