(D) Let $n$ be a natural number such that $\gcd(n, 10) = 1$. Consider the sequence of $n+1$ numbers $m_k = \sum_{i=0}^{k-1} 10^i = \frac{10^k-1}{9}$ for $k = 1, 2, \dots, n+1$. By the Pigeonhole Principle,at least two of these numbers,say $m_i$ and $m_j$ with $i < j$,must have the same remainder when divided by $n$. Thus,$n$ divides $m_j - m_i = 11\dots100\dots0 = 11\dots1 \times 10^i$. Since $\gcd(n, 10) = 1$,it follows that $\gcd(n, 10^i) = 1$,so $n$ must divide $m_{j-i}$,which consists only of digits $1$.
$(b)$ Let the rational number be $\frac{p}{q}$. We can write $q = 2^r \cdot 5^s \cdot t$,where $\gcd(t, 10) = 1$. From part $(a)$,there exists $m$ consisting only of $1$'s such that $t \mid m$. Let $m = \frac{10^c-1}{9}$. Then $9m = 10^c-1$. Since $t \mid m$,we have $t \mid (10^c-1)$. Let $10^c-1 = kt$. We can choose $b = \max(r, s)$. Then $10^b$ is divisible by $2^r$ and $5^s$. Thus,$10^b(10^c-1)$ is divisible by $2^r \cdot 5^s \cdot t = q$. Therefore,$\frac{p}{q} = \frac{p \cdot \frac{10^b(10^c-1)}{q}}{10^b(10^c-1)} = \frac{a}{10^b(10^c-1)}$ for some integer $a$.