68. a) What is the last digit of the number

$$
\left(\ldots\left(\left(\left(7^{7}\right)^{7}\right)^{7}\right)^{\ldots 7}\right)
$$

(raising to the power of 7 is repeated 1000 times)? What are the last two digits of this number?
b) What is the last digit of the number

$$
7\left(7^{\left(.7^{\left(7^{7}\right)}\right)} \ldots\right)
$$

written using 1001 sevens, similar to the number in problem a), but with a different order of exponentiation? What are the last two digits of this number?
68. a) If you multiply two numbers, one of which ends in the digit $a$, and the second in the digit $b$, then their product will end in the same digit as the product $a b$. This observation allows us to easily solve the given problem. We will sequentially raise to powers, keeping track only of the last digit of the number: $7^{2}$ ends in the digit $9, 7^{3} = 7^{2} \cdot 7$ ends in the digit $3, 7^{4} = 7^{3} \cdot 7$ ends in the digit 1, and $7^{7} = 7^{4} \cdot 7^{3}$ ends in the digit 3.

Next, in the same way, we find that $\left(7^{7}\right)^{7}$ ends again in the digit 7 (indeed, $\left(7^{7}\right)^{2}$ ends in the digit $9, \left(7^{7}\right)^{3}$ ends in the digit $7, \left(7^{7}\right)^{4}$ ends in the digit 1, and $\left(\left(7^{7}\right)^{7}\right)$ ends in the digit 7). From this, it follows that the number $\left(\left(7^{\prime}\right)^{1}\right)^{\top}$ ends in the same digit as the number $7^{7}$, i.e., the digit 3, the number $\left.\left(\left(7^{7}\right)^{7}\right)^{7}\right)^{7}$ ends again in the digit 7, and so on. Continuing in the same way, after an odd number of exponentiations by 7, we will always arrive at a number ending in the digit 3, and after an even number of exponentiations by 7, a number ending in the digit 7. Since 1000 is an even number, the number of interest to us ends in the digit 7.

If one number ends in a two-digit number $A$, and the second in a two-digit number $B$, then their product ends in the same two digits as the product $A \cdot B$. This allows us to find the last two digits of the number of interest to us. As before, we check that $7^{7}$ ends in the two digits 43, and $\left(7^{7}\right)^{7}$ ends in the same digits as $43^{7}$, namely the digits 07. From this, it follows that, raising the numbers 7, 77, $\left(7^{7}\right)^{7}, \ldots$ sequentially to the power of 7, we will after an odd number of exponentiations end up with a number ending in the digits 43, and after an even number of exponentiations, a number ending in the digits 07. Therefore, the number of interest to us ends in the digits 07.

b) In the solution to part a), we saw that $7^{4}$ ends in the digit 1. From this, it follows that $7^{4 k} = \left(7^{4}\right)^{k}$ also ends in the digit 1 and $7^{4 k + l}$, where $l$ is one of the numbers $0, 1, 2$ or 3, ends in the same digit as $7^{l} \left(7^{4 k + l} = 7^{4 k} \cdot 7^{l}\right)$. Thus, the problem reduces to determining the remainder when the exponent, to which 7 is raised to obtain the number in the problem, is divided by 4.

The exponent to which 7 is raised in the problem itself is 7 raised to a very large power; we need to determine the remainder when this power of 7 is divided by 4. But $7 = 8 - 1$; from this, it follows that $7^{2} = (8 - 1) \cdot (8 - 1)$ gives a remainder of 1 when divided by 4, $7^{3} = 7^{2} \cdot (9 - 1)$ gives a remainder of -1 (or, equivalently, a remainder of 3) when divided by 4, and generally, every even power of 7 gives a remainder of 1 when divided by 4, and every odd power gives a remainder of -1 (i.e., +3). But the power of 7 of interest to us in this case is necessarily an odd number (since it itself is a power of 7), and therefore, the number in the problem has the form $7^{4 k + 3}$ and, consequently, ends in the same digit as $7^{3}$, i.e., the digit 3.

Since $7^{4}$ ends in the digits 01, $7^{4 k + l}$ ends in the same two digits as $7^{l}$. Therefore, the number of interest to us ends in the same two digits as the number $7^{3}$, i.e., the digits 43.