Given $10<a<m<10a$, is it possible to calculate $10a \pmod{m}$ without calculating $10a$ ($a$ and $m$ are very big numbers)?
Note that the formula $$ab \pmod{m}=((a \pmod{m}) \cdot (b \pmod{m}) \pmod{m}$$ is of no use here, since it will get us back to $10a \pmod{m}$
Edit: Thanks for fixing my question. It's clear now.
Edit2: I need to avoid overflow (in programming) when $10a$ is too big to fit in an integer.