Give two different methods for finding 2^999(mod 5), one using Fermat's little theorem and the other using basic problem solving methods.
Using Fermats little theorem $\displaystyle 2^4 \equiv 1 \pmod{5} $
Then $\displaystyle (2^4)^{249} \equiv 1 \pmod{5} $
Finally $\displaystyle (2^4)^{249}*2^3 \equiv 1*2^3 \pmod{5} $
therefore $\displaystyle 2^3 \equiv 3 \pmod{5} $
So $\displaystyle 2^{999} \equiv 3 \pmod{5} $