<s>[INST] Find last two digit I have the following task: $1997^{1998} \pmod {100} = ?$ 
How to find it? Could you please, explain to me step by step with?
Can you suggest any solution, without using Euler function? But rather, with binomial theorem.
 [/INST] First of all, only the last two digits of 1997 will have an impact on your answer. This is because $100^n \equiv 0$ and $(100 + m)^n \equiv m^n (mod 100)$.
So we need to find the last two digits of $97^{1998}$. We can proceed by calculating various powers of 97 (mod 100).
$97 \equiv -3$
$97^2 \equiv 9$
$97^4 \equiv 81 \equiv -19$
$97^8 \equiv (-19)^2 = 361 \equiv 61$
$97^{16} \equiv 61^2 = 3600+120+1 \equiv 21$
$97^{32} \equiv 21^2 = 441 \equiv 41$
$97^{64} \equiv 41^2 = 1600+80+1 \equiv 81$.
So $97^{64} \equiv 97^4$ so $97^{60} \equiv 1$, so $1997^{60} \equiv 1$.
So $1997^{1998} \equiv 1997^{60×33+18} \equiv 1997^{18} \equiv 97^{16} × 97^2 \equiv 97^{16} × (-3)^2 \equiv 21 × 9 \equiv 189 \equiv 89$.
</s>