[Math] The remainder when $33333\ldots$ ($33$ times) is divided by $19$

elementary-number-theorymodular arithmetic

$A= 33333\ldots$ ($33$ times). What is the remainder when $A$ is divided by $19$?

I don't know the divisibility rule of $19.$

What I did was
$32\times(33333\times100000)/19$ and my remainder is not zero and this is completely divisible by $19.$

This is a gmat exam question.

Best Answer

We have $$A=3\cdot \frac{10^{165}-1}{9}$$

We have $10^{165}\equiv 10^3\equiv 12\mod 19$ , so we have $10^{165}-1\equiv 11 \mod 19$

Modulo $19$ we have $9^{-1}=17$, hence $A\equiv 3\cdot 17\cdot 11\equiv 10\mod 19$