About the fact that every natural number which is coprime to $10$ has a multiple in the form that each digit is $1$. It is known that every natural number which is coprime to $10$ has a multiple in the form that each digit is $1$.
For example, we can see
$$111=3\times 37, 111111=7\times 15873, 111111111=9\times 12345679, $$$$11=11\times 1, 111111=13\times 8547,\cdots$$
To prove the above fact is easy if we use Pigeonhole principle.
Then, here is my question.

Question : How can we get the minimum digit (let this be $N(m)$) of multiples of $m$ in the above form for any $m\in\mathbb N$ which is coprime to $10$?

(I think the best answer would be to represent $N(m)$ by $m$ if it is possible.)
For example, though we get $111111111111=13\times 8547008547$, we know that $N(13)=6.$
Motivation : The above fact got me interested in this question.
 A: The easiest way to get the minimum digit is to evaluate $\frac1m$, and find the number of digits within the repeating part of the number (unless $m$ is a multiple of 3, in which case you have to make some corrections).
So, for instance, to get a repunit (the general term for numbers of the form $111...111$) from $7$, you have to multiply by 15873 to get 111111. That's N(7)=6. Similarly, if you evaluate $\frac17$, you get
$$
\frac17 = 0.\overline{142857}
$$
Six digits for the repeating part of the decimal expansion.
This works because you have
$$
\frac{999999}7 = 142857
$$
And thus
$$
\frac{111111}7 = \frac{142857}9 = 15873
$$
Where $m$ is divisible by 3, you must multiply the resulting number of digits by 3, and similarly, if $m$ is divisible by 9, you must multiply by 9. You do not need to do this for higher powers of 3 beyond this - for instance, for $m=27$, you have
$$
\frac1{27} = 0.\overline{037}
$$
and thus you get 3, but you only need 27 digits, so you only have to multiply by 9.
