/**
 * Given a list of numbers and a divisor, delete all elements in the list
 * that are divisible by the divisor and then divide each remaining element by the divisor.
 *
 * Example:
 * numbers = [10, 13, 16, 19, 22, 25]
 * divisor = 5
 *
 * After deleting and dividing, the result should be:
 * [2.0, 3.8]
 *
 * @param numbers A list of numbers
 * @param divisor An integer divisor
 * @return A list of the remaining elements after deleting and dividing
 */
fun deleteAndDivide(numbers: MutableList<Double>, divisor: Int): List<Double> {

    // Delete elements divisible by divisor
    val iterator = numbers.iterator()
    while (iterator.hasNext()) {
        if (iterator.next() % divisor == 0.0) {
            iterator.remove()
        }
    }

    // Divide each remaining element by divisor
    for (i in numbers.indices) {
        numbers[i] /= divisor
    }

    return numbers
}
/**
 * Given a list of numbers and a divisor, delete all elements in the list
 * that are divisible by the divisor and then divide each remaining element by the divisor.
 *
 * Example:
 * numbers = [10, 13, 16, 19, 22, 25]
 * divisor = 5
 *
 * After deleting and dividing, the result should be:
 * [2.0, 3.8]
 *
 * @param numbers A list of numbers
 * @param divisor An integer divisor
 * @return A list of the remaining elements after deleting and dividing
 */
fun deleteAndDivide(numbers: MutableList<Double>, divisor: Int): List<Double> {
/**
 * Given a list of numbers and a divisor, delete all elements in the list
 * that are divisible by the divisor and then divide each remaining element by the divisor.
 *
 * Example:
 * numbers = [10, 13, 16, 19, 22, 25]
 * divisor = 5
 *
 * After deleting and dividing, the result should be:
 * [2.0, 3.8]
 *
 * @param numbers A list of numbers
 * @param divisor An integer divisor
 * @return A list of the remaining elements after deleting and dividing
 */
fun deleteAndDivide(numbers: MutableList<Double>, divisor: Int): List<Double> {

    // Delete elements divisible by divisor
    val iterator = numbers.iterator()
    while (iterator.hasNext()) {
        if (iterator.next() % divisor == 0.0) {
            iterator.remove()
        }
    }

    // Divide each remaining element by divisor
    for (i in numbers.indices) {
        numbers[i] /= divisor
    }

    return numbers
}