+1 vote

# 222 ^ 222, divided by 7, what is the remainder ?

asked Oct 11, 2014 in TCS 2 flags

+1 vote

$\displaystyle\frac{{{{222}^{222}}}}{7} = \frac{{{5^{222}}}}{7}$
Fermat's little theorem = $\displaystyle\frac{{{a^{p - 1}}}}{p} = 1$
So $\displaystyle\frac{{{5^{222}}}}{7} = \frac{{{{\left( {{5^6}} \right)}^{37}}}}{7} = \frac{{{1^{37}}}}{7} = 1$