How to use the 'modulus' operator?

$1$. The remainder will be the unit digit of the number you are dividing. For example, Remainder when $16$ is divided by $10$ is $6$.

Proof: If you have got a $n$ digit number then you can write it as $10^{n-1}a_0+10^{n-2}a_1+........+10a_{n-2}+a_{n-1}$ where $a_{n-1}$ is the unit digit. Notice that all the terms in the sum are divisible by $10$, the only suspect is $a_{n-1}$.

$2$. Notice that unit digit of a square number can be $0,1,4,5,6,9$ and corresponding unit digits of $4th$ powers can be $0,1,6,5,6,1,$.

So, largest remainder is $6$.


By Fermat's Little Theorem, $x^4$ has remainder $1$ when divided by $5$; so, when divided by $10$, it could only have as remainder $1$ or $6$. The latter is achievable, e.g., by $2^4$ mod $10 \equiv 6$ as the max. QED.


We know that the unit digits of the squares always belong in the set of these numbers : $A = \{ 1,4,9,6,5,0\}$.

The unit digits of the squares of the numbers $\in A$ gives us the possible unit digits of the fourth powers of all numbers. Thus, we create a a set $B = \{1,6,5,0\}$ where the elements in $B$ denotes the possible modulo of the fourth powers of a number $10$.

Out of these, we can see that the maximum possible remainder is $6$. On a side note, this is achieved for all even numbers except multiples of $10$. Hope it helps.