def solve(smin, smax, coef):
    """
    Return a list of lists of non-negative integers `n` that satisfy
    the inequalities,
    sum([coef[i] * n[i] for i in range(len(coef)]) > smin
    sum([(coef[i]+1) * n[i] for i in range(len(coef)]) < smax
    where coef is a list of positive integer coefficients, ordered
    from highest to lowest.
    """
if smax <= smin:
    return []
if smin < 0 and smax <= coef[-1] + 1:
    return [[0] * len(coef)]
c0 = coef[0]
c1 = c0 + 1
n_max = (smax - 1) // c1
solutions = []
if len(coef) > 1:
    for n0 in range(n_max + 1):
        for solution in solve(smin - n0 * c0, smax - n0 * c1, coef[1:]):
            solutions.append([n0] + solution)
else:
    n_min = max(0, smin // c0 + 1)
for n0 in range(n_min, n_max + 1):
    solutions.append([n0])
return solutions
find the set of integers for which two linear equalities holds true