51 (974). What is the last digit of the difference $43^{43}-17^{17}$?
Solution. Let's determine the last digits of various powers of the numbers 43 and 17. The number 43 ends with the digit $3, 43^2$ ends with the digit $9, 43^3$ ends with the digit $7, 43^4$ ends with the digit 1. Therefore, the last digits in subsequent powers of the number 43 will repeat: $3, 9, 7, 1$, and so on. Since $43^{43} = 43^{4 \cdot 10 + 3} = (43^4)^{10} \cdot 43^3$, and $(43^4)^{10}$ ends with the digit 1, $43^{43}$, like $43^3$, ends with the digit 7.

Similarly, we establish that the last digits of the powers $17^1, 17^2, 17^3, 17^4$ are $7, 9, 3, 1$, respectively, i.e., the last digits of consecutive powers of the number 17 will also repeat every four powers. Since $17^{17} = 17^{4 \cdot 4 + 1} = (17^4)^4 \cdot 17^1$, the number $17^{17}$, like $17^1$, ends with the digit 7 (just like the number $43^{43}$). Therefore, the difference $43^{43} - 17^{17}$ ends with zero.