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.

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}
$$
