Let $m, n$ be strictly positive integers. Determine the gcd of $\underbrace{1 \ldots 1}_{m \text { digits }}$ and of

$\underbrace{1 \ldots 1}_{n \text { digits }}$
Suppose $m<n$ and write $\mathfrak{n}=\mathrm{mq}+\mathrm{r}$ for the Euclidean division of $n$ by $m$. Then the Euclidean division of $\underbrace{1 \ldots 1}_{n \text { digits }}$ by $\underbrace{1 \ldots 1}_{m \text { digits }}$ is written as

$$
\underbrace{1 \ldots 1}_{n \text { digits }}=\underbrace{1 \ldots 1}_{m \text { digits }}\left(10^{m(q-1)+r}+\ldots 10^{m+r}+10^{r}\right)+\underbrace{1 \ldots 1}_{r \text { digits }}
$$

By applying the Euclidean algorithm, we see that the gcd sought is $\underbrace{1 \ldots 1}_{\operatorname{gcd}(\mathfrak{m}, n)}$.