587. Find the last two digits of the power: a) $7^{38} ; \quad$ b) $7^{7^{7}}$.
$\triangle$ Let's solve a more general problem: what values can the last two digits of the power $7^{n}$ take for natural $n$? By assigning $n$ the values $1,2,3,4,5,6, \ldots$ in sequence, we will each time find the last two digits of this power - until repetitions occur. (Think about why repetitions will eventually occur.) We get the following table.

| $n$ | 1 | 2 | 3 | 4 | 5 | 6 | $\ldots$ |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :--- |
| The last two digits of $7^{n}$ | 07 | 49 | 43 | 01 | 07 | 49 | $\ldots$ |

Thus, these digits repeat when $n$ increases by 4, generally by $4 k(k \in N)$.

a) To find the last two digits of the power $7^{38}$, we divide 38 by 4 with a remainder: $38=4 \cdot 9+2$. Then the last two digits of this power coincide with the last two digits of the power $7^{2}=49$, i.e., form the number 49.

b) To determine the last two digits of the power $7^{7^{7}}$, we divide the exponent, which is $7^{7}$, by 4 with a remainder. This is more difficult here. We get:

$$
7^{7}=(8-1)^{7}=(8-1)(8-1) \ldots(8-1)=8 k-1=(8 k-4)+3=4(2 k-1)+3 .
$$

Then the last two digits of this power coincide with the last two digits of the power $7^{3}=343$, i.e., make up the number 43.

Answer: a) 49; b) 43.