Needing help finding the least nonnegative residue 
*

*$2^{47} \bmod 23$

*$776^{79} \bmod 7$

*$12347369^{3458} \bmod 19$  

*$5^{18} \bmod 13$ 

*$23^{560} \bmod 561$


I really don't understand how to calculate the ones to powers. Could anyone explain how to do one of these examples? 

First make sure that you reduce the element which you want to exponentiate. After this you should apply Euler's theorem to reduce the exponent (note that this is only possible if the element you want to exponentiate is relatively prime to the modulus.
I will do $776^{79}$ as an example:
$776^{79}\equiv 6^{79}\bmod 7$ since $776\equiv 6 \bmod 7$ 
$6$ and $7$ are relatively prime so we can use euler's theorem, it tells us $6^{\varphi(7)}\equiv 1 \bmod 7$. Since $7$ is prime $\varphi(7)=7-1=6$ so we have $6^{6}\equiv 1 \bmod 7$. We can now finish:
$6^{79}=6^{78}\cdot 6=(6^6)^{13}\cdot 6\equiv 1\cdot 6\equiv 6\bmod 7$
Therefore $776^{79}\equiv 6 \bmod 7$.
