Let $p$ be prime. Does $x^3 \equiv a\bmod{p}$ have a solution for every $a$?
Here is my first idea: I know that $$x^3 \equiv a\bmod{p}$$ iff $$p\mid x^3-a$$ iff $$x^3-a=pm$$
Where $m \in \mathbb{Z}$. Then I was attempting to use the idea that now $x^3-pm=a$. I was thinking that by factoring the left side I could somehow show that there will be a solution for any $a$.
A second idea I had was to use the theorem that says the following: The congruence $ax \equiv b \bmod{n}$ has a solution iff $\gcd(a, n)\mid b$. Can I use this to rewrite the problem as $x^2x \equiv a\bmod{p}$, and then say that it will have a solution if $\gcd(x^2, p)\mid a$? And, if this approach is even possible, does it help, or should I stick to my first idea?