Q:

solve congruence for m

I just need to know is my calculation here correct. I have
$$ 4m-2 \equiv 1,2,5,6 \pmod{10} $$
and I want to find the value of m. Is it correct if I divide 
through by 2, I will have
$$ 2m-1 \equiv \dfrac{1}{2},1,\dfrac{5}{2},3 \pmod{5} $$
Then, 
$$2m \equiv \dfrac{1}{2}+1,(1+1),\dfrac{5}{2}+1, (3+1) \pmod{5}$$
And finally, 
$$m \equiv 2,2,3,4 \pmod{5}$$
Is this correct?

A:

Is $m$ supposed to be an integer? If it is, note that
$$4m-2\ \equiv1,2,5,6\ \pmod{10}$$
means the last digit of $4m-2$ is 1, 2, 5, or 6.* But $4m-2$ is an even number and so its last digit cannot be 1 or 5. Therefore you can eliminate these and just consider
$$4m-2\ \equiv\ 2,6\pmod{10}$$
*If $4m-2$ is negative, its last digit is 9, 8,5, or 4; e.g. $-14\equiv6\pmod{10}$.

