def sum_divisible_by(n: int, limit: int) -> int:
    """Computes the sum of all the multiples of n up to the given limit.

    :param n: Multiples of this value will be summed.
    :param limit: Limit of the values to sum (inclusive).
    :return: Sum of all the multiples of n up to the given limit.
    """
    p = limit // n
    return n * (p * (p + 1)) // 2