/**
 * Given a list of numbers, removes all elements that are divisible by the given divisor.
 *
 * @param numbers A list of integers.
 * @param divisor An integer divisor to check for divisibility.
 * @return A list of numbers after removing elements divisible by the divisor.
 * @throws IllegalArgumentException If the input list is empty.
 */
fun removeElementsFromList(numbers: List<Int>, divisor: Int): List<Int> {

    if (numbers.isEmpty()) {
        throw IllegalArgumentException("Input list cannot be empty.")
    }

    return numbers.filter { it % divisor != 0 }
}
/**
 * Given a list of numbers, removes all elements that are divisible by the given divisor.
 *
 * @param numbers A list of integers.
 * @param divisor An integer divisor to check for divisibility.
 * @return A list of numbers after removing elements divisible by the divisor.
 * @throws IllegalArgumentException If the input list is empty.
 */
fun removeElementsFromList(numbers: List<Int>, divisor: Int): List<Int> {
/**
 * Given a list of numbers, removes all elements that are divisible by the given divisor.
 *
 * @param numbers A list of integers.
 * @param divisor An integer divisor to check for divisibility.
 * @return A list of numbers after removing elements divisible by the divisor.
 * @throws IllegalArgumentException If the input list is empty.
 */
fun removeElementsFromList(numbers: List<Int>, divisor: Int): List<Int> {

    if (numbers.isEmpty()) {
        throw IllegalArgumentException("Input list cannot be empty.")
    }

    return numbers.filter { it % divisor != 0 }
}