I have the following Problem:
- I know the range within the results of a division must lie. [ quotientrange ] Additionally, the quotient should not exceed a certain number of fractions.
- I know, that both dividend and divisor must consist of a certain set of digits. Dividend and divisor are further restricted by a range. Edit: Dividend and divisor are only integers.
My question is: How can I determine a set of dividends and divisors, which satisfis this assumption?
Example:
- Dividend should be within the rage [100.00; 999.99] and only consist of the digits 1, 2, 3, 4, 5
- Divisor should be within the range [10; 99] and only consist of the digits 1, 2, 5.
- Thus, the maximum range of the result is clearly determined by [100.00 / 99; 999.99 / 10]
Question: How can I determine a set [dividend1,dvisor1;....;dividend_n,divisor_n] which satisfies my assumptions?
Brute force is an alternative, certainly, by calculating from an assumed result (the range is known), constructing a valid divisor, performing a multiplication and chcecking, wheater the result satisfies the constraint for the dividend.
However, I wonder if there is a more intelligent approach?