/**
 * This function modifies the elements in a list based on a given operator and value.
 *
 * @param lst The input list.
 * @param operator The operator to be used for modification (+, -, *, /).
 * @param value The value to be used for modification.
 * @return The modified list.
 */
fun modifyList(lst: List<Int>, operator: Char, value: Int): List<Int> {

    return when (operator) {
        '+' -> lst.map { it + value }
        '-' -> lst.map { it - value }
        '*' -> lst.map { it * value }
        '/' -> lst.map { it / value }
        else -> throw IllegalArgumentException("Invalid operator")
    }
}
/**
 * This function modifies the elements in a list based on a given operator and value.
 *
 * @param lst The input list.
 * @param operator The operator to be used for modification (+, -, *, /).
 * @param value The value to be used for modification.
 * @return The modified list.
 */
fun modifyList(lst: List<Int>, operator: Char, value: Int): List<Int> {
/**
 * This function modifies the elements in a list based on a given operator and value.
 *
 * @param lst The input list.
 * @param operator The operator to be used for modification (+, -, *, /).
 * @param value The value to be used for modification.
 * @return The modified list.
 */
fun modifyList(lst: List<Int>, operator: Char, value: Int): List<Int> {

    return when (operator) {
        '+' -> lst.map { it + value }
        '-' -> lst.map { it - value }
        '*' -> lst.map { it * value }
        '/' -> lst.map { it / value }
        else -> throw IllegalArgumentException("Invalid operator")
    }
}