This problem is a programming version of Problem 130 from projecteuler.net
A number consisting entirely of ones is called a repunit. We shall define to be a repunit of length ; for example, .
Given that is a positive integer and , it can be shown that there always exists a value, , for which is divisible by , and let be the least such value of ; for example, and .
You are given that for all primes, , that is divisible by . For example, when , , and is divisible by .
However, there are rare composite values for which this is also true; the first five examples being , , , , and .
Given and , print all composite values in the interval for which and is divisible by .
The input contains consists of one line containing two integers and separated by a space.
In files #01-#05:
In files #06-#10:
In files #11-#25:
Output all composite values in the interval for which and is divisible by , each in a single line.
and 90 is divisible by 6.