What is the remainder when the number below is divided by $100$? What is the remainder when the below number is divided by $100$?
$$
1^{1} + 111^{111}+11111^{11111}+1111111^{1111111}+111111111^{111111111}\\+5^{1}+555^{111}+55555^{11111}+5555555^{1111111}+55555555^{111111111}
$$
How to approach this type of question? I tried to brute force using Python, but it took very long time.
 A: Hint
If $a \equiv b \pmod{n}$ then $a^k \equiv b^k \pmod{n}$
So for instance $111 \equiv 11 \pmod{100}$ so $111^{111} \equiv 11^{111} \pmod{100}$
Also note that $11^2 = 121 \equiv 21$ so $11^{111} = 11^{2·65 + 1} \equiv 11·21^{65}$. But $21^2 = 441 \equiv 41$ and so forth.
Continue simplifying and repeat for the rest of the numbers.
A: HINT:
$$(1+10n)^{1+10n}=1+\binom{1+10n}1(10n)\pmod{100}\equiv1+10n$$
and $$(5+50n)^{1+10n}=5^{1+10n}+\binom{1+10n}1(50n)5^{10n}\pmod{100}$$
Now, $$5^{m+2}-5^2=5^2(5^m-1)\equiv0\pmod{100}\implies5^{m+2}\equiv25\pmod{100}$$ for integer $m\ge0$
$$\implies5^{1+10n}+\binom{1+10n}1(50n)5^{10n}\equiv25+(1+10n)(50n)25\pmod{100}$$
$$\equiv25+1250n$$ for $n\ge1$
For odd $n,$ $$(5+50n)^{1+10n}\equiv25+50\pmod{100}$$
A: Two facts help here:


*

*if $a \equiv b \pmod m$, then $a^n \equiv b^n \pmod m$

*For any $a$ relatively prime to $100$, $a^{40} \equiv 1 \pmod {100}$


So, for example,
$$
111^{111} \equiv 11^{111} \equiv (11^{40})^2 11^{31} \equiv 11^{31} \pmod{100}
$$
