/**
 * Given a list [lst], a number [num], and a range [start] to [end], this function replaces the elements in the specified
 * range with the multiplication of each element and [num]. It returns the updated list.
 *
 * @param lst The original list.
 * @param num The number to multiply the elements with.
 * @param start The start index of the range to replace.
 * @param end The end index of the range to replace.
 * @return The updated list after replacing the specified range with the multiplied elements.
 */
fun multiplyReplace(lst: MutableList<Int>, num: Int, start: Int, end: Int): List<Int> {

    for (i in start until end) {
        lst[i] = lst[i] * num
    }
    return lst
}
/**
 * Given a list [lst], a number [num], and a range [start] to [end], this function replaces the elements in the specified
 * range with the multiplication of each element and [num]. It returns the updated list.
 *
 * @param lst The original list.
 * @param num The number to multiply the elements with.
 * @param start The start index of the range to replace.
 * @param end The end index of the range to replace.
 * @return The updated list after replacing the specified range with the multiplied elements.
 */
fun multiplyReplace(lst: MutableList<Int>, num: Int, start: Int, end: Int): List<Int> {
/**
 * Given a list [lst], a number [num], and a range [start] to [end], this function replaces the elements in the specified
 * range with the multiplication of each element and [num]. It returns the updated list.
 *
 * @param lst The original list.
 * @param num The number to multiply the elements with.
 * @param start The start index of the range to replace.
 * @param end The end index of the range to replace.
 * @return The updated list after replacing the specified range with the multiplied elements.
 */
fun multiplyReplace(lst: MutableList<Int>, num: Int, start: Int, end: Int): List<Int> {

    for (i in start until end) {
        lst[i] = lst[i] * num
    }
    return lst
}