<s>[INST] Find the modular residue of this product.. Please help me solve this and please tell me how to do it..
$12345234 \times 23123345 \pmod {31} = $?
edit: please show me how to do it on a calculator not a computer thanks:)
 [/INST] As $10^1\equiv 10\pmod{31},$
$10^2=100\equiv7,$
$10^3\equiv10\cdot7\equiv8,$
$10^4\equiv49\equiv18,$
$10^5=10^2\cdot10^3\equiv 7\cdot8\equiv25,$
$10^6=(10^3)^2\equiv8^2\equiv2,$
$10^7=10^4\cdot10^3\equiv18\cdot8\equiv20,$
$$12345234=4+3\cdot10+2\cdot10^2+5\cdot10^3+4\cdot10^4+3\cdot10^5+2\cdot10^6+1\cdot10^7$$
$$\equiv4+3\cdot10+2\cdot7+5\cdot8+4\cdot18+3\cdot25+2\cdot2+1\cdot20\pmod{31}$$
</s>