Find all polynomials with real coefficients $P(X)$ such that $P(\lfloor x\rfloor)=\lfloor P(x)\rfloor$ for all real x.
I've asked a similar question with the fractional part function before instead, and I thought of changing the fractional part to a floor function. The thing is, other than substituting values like $0, 1$ etc. I genuinely can't think of any strategies to work on this one. Any hints or solutions would be highly appreciated.
Hints: Fill in the gap yourself.