def generate_solution(x: int, n: int) -> int:
    """This is the "naive" way to compute the solution, for testing purposes.
    In this one, we actually run through each element.
    """
    counter = 0

    for i in range(1, n + 1):
        for j in range(1, n + 1):
            if i * j == x:
                counter += 1
    return counter