<s>[INST] How to use the 'modulus' operator? This is a problem from BdMO $2012$ Dhaka region Question Paper:

The product of a number with itself is called its square. For example,
  $2$ multiplied by $2$ is $4$, so $4$ is the square of $2$. If you take a square
  number and multiply it with itself, what will be the largest possible
  remainder if the product is divided by $10$?

I came up with this: $$x^4 \mod {10}$$
I know that the modulus (%) operator calculates the remainder of a division. And that it can be used to see, suppose, whether $N$ is a multiple of $M$ or not. Nothing more than that. I am much familiar with mod because of my programming experience with mid-level languages like C and C++. It was not until later that I came to know that modulus is used in mathematics as well.
Now, how to use  the 'modulus' operator? How can I use this to go further into solving this problem?
 [/INST] So you can simply try out all $10$ possible options:


*

*$x\equiv0\pmod{10} \implies x^4\equiv0^4\equiv   0\equiv0\pmod{10}$

*$x\equiv1\pmod{10} \implies x^4\equiv1^4\equiv   1\equiv1\pmod{10}$

*$x\equiv2\pmod{10} \implies x^4\equiv2^4\equiv  16\equiv6\pmod{10}$

*$x\equiv3\pmod{10} \implies x^4\equiv3^4\equiv  81\equiv1\pmod{10}$

*$x\equiv4\pmod{10} \implies x^4\equiv4^4\equiv 256\equiv6\pmod{10}$

*$x\equiv5\pmod{10} \implies x^4\equiv5^4\equiv 625\equiv5\pmod{10}$

*$x\equiv6\pmod{10} \implies x^4\equiv6^4\equiv1296\equiv6\pmod{10}$

*$x\equiv7\pmod{10} \implies x^4\equiv7^4\equiv2401\equiv1\pmod{10}$

*$x\equiv8\pmod{10} \implies x^4\equiv8^4\equiv4096\equiv6\pmod{10}$

*$x\equiv9\pmod{10} \implies x^4\equiv9^4\equiv6561\equiv1\pmod{10}$

</s>