# Euler's Totient Theorem Problem 2 Solution

## Problem

(BorealBear) Find the last two digits of $3^{3^{3^{3}}}$.

## Solution

This problem is just asking for $3^{3^{3^{3}}}\pmod{100}$. We can start by expanding the uppermost exponent, which gives us $3^{3^{27}}$. Then, since $\phi(100)=40$, the exponent will be equal to $3^{27}\pmod{40}$. We can see that $3^4\equiv 81\equiv 1\pmod{40}$, so the expression simplifies to $3^3\equiv 27\pmod{40}$.

We're now left with finding the last two digits of $3^{27}$. To do this, we use Chinese Remainder Theorem. We find that it is $3$ mod $4$ and $12$ mod $25.$ From here, we use guess+check to get $\boxed{87}$. -BorealBear