Recently I was solving the problem which said that I have to find the smallest number consisting of only 1-s (1, 11, 111, ...) which will be divisible by the given number $$$n$$$ not divisible $$$2$$$ and $$$5$$$. This problem is easy, but I was surprised that it is possible for any $$$n$$$ (at least for $$$<= 100 000$$$). How can I prove this?