I'm not clear on what the problem states, but I'm assuming it means that 0,1,2,3,4 are plugged in as x.
So, see...
What the equation is saying is that x^5 must be divisble by 5.
Let's plug in numbers
\(0^5 \equiv 0 \pmod{5} \) so it works
\(1^5 = 1 \equiv 1 \pmod5\) so it doesn't work
\(2^5 = 32 \equiv 2 \pmod5\) so it doesn't work
\(3^5=243\equiv3 \pmod 5\) so it doesn't work
\(4^5 = 1024 \equiv 4 \pmod 5\) so it doesn't work
So the only one that works is 0.
Then again, residue is usually used as the remainder, but I hope my asusmption is correct.
Thanks! :)