I'm trying to prepare myself for mathematics olympiad. I faced a problem which is kind of interesting, here is the question:
Oleg chose a positive integer like $m$ and Andrew found the following summation : \begin{align} 1^m +2^m + \cdots + 998^m+ 999^m \end{align} What is the last digit of this sum ?
For example if $m = 1 $ then we have :
\begin{align} 1+2+3+\cdots+998+999 = \frac{999 \times 1000}{2} = 499500 \end{align} So the answer is $0$ when $m=1$
You can add $1000^m$ to the sum as it will not change the last digit as its last digit is $0$. Last digits of $1^m,11^m,21^m,...,991^m$ are the same. Similarly for $2^m,12^m,...,992^m$ and so on till $10^m, 100^m,...1000^m$. So the ones digit of $1^m+2^m+...+10^m$ is the same as that of $11^m+12^m+...+20^m$ and so on. There are $100~10$s in $1000$, so the ones digit of the sum is$$(1^m+2^m+...+10^m)*100\mod10$$which is $0$.