/**
 * This function takes a list of numbers and a number of repetitions as input.
 * It multiplies each number in the list by the product of the previous numbers, repeated for the given number of repetitions.
 * Returns the updated list of numbers.
 */
fun multiplyRepeatedly(numbers: MutableList<Int>, repetitions: Int): MutableList<Int> {

    var product = 1
    repeat(repetitions) {
        for (j in numbers.indices) {
            numbers[j] *= product
            product = numbers[j]
        }
    }
    return numbers
}
/**
 * This function takes a list of numbers and a number of repetitions as input.
 * It multiplies each number in the list by the product of the previous numbers, repeated for the given number of repetitions.
 * Returns the updated list of numbers.
 */
fun multiplyRepeatedly(numbers: MutableList<Int>, repetitions: Int): MutableList<Int> {
/**
 * This function takes a list of numbers and a number of repetitions as input.
 * It multiplies each number in the list by the product of the previous numbers, repeated for the given number of repetitions.
 * Returns the updated list of numbers.
 */
fun multiplyRepeatedly(numbers: MutableList<Int>, repetitions: Int): MutableList<Int> {

    var product = 1
    repeat(repetitions) {
        for (j in numbers.indices) {
            numbers[j] *= product
            product = numbers[j]
        }
    }
    return numbers
}