/**
 * This exercise requires creating a tuple from a given string and performing subtraction on all elements.
 *
 * @param string The string from which the tuple is to be created.
 * @param subtractValue The value to subtract from each element of the tuple.
 * @return The resulting tuple after subtracting the value from each element.
 *
 * Examples:
 * createTupleFromStringAndSubtract("5,9,2,7", 3) -> (2, 6, -1, 4)
 * createTupleFromStringAndSubtract("10,4,8", 2) -> (8, 2, 6)
 */
fun createTupleFromStringAndSubtract(string: String, subtractValue: Int): List<Int> {

    // Split the string into individual elements
    val elements = string.split(",").map { it.toInt() }

    // Perform subtraction on each element of the tuple
    val resultTuple = elements.map { it - subtractValue }

    return resultTuple
}
/**
 * This exercise requires creating a tuple from a given string and performing subtraction on all elements.
 *
 * @param string The string from which the tuple is to be created.
 * @param subtractValue The value to subtract from each element of the tuple.
 * @return The resulting tuple after subtracting the value from each element.
 *
 * Examples:
 * createTupleFromStringAndSubtract("5,9,2,7", 3) -> (2, 6, -1, 4)
 * createTupleFromStringAndSubtract("10,4,8", 2) -> (8, 2, 6)
 */
fun createTupleFromStringAndSubtract(string: String, subtractValue: Int): List<Int> {
/**
 * This exercise requires creating a tuple from a given string and performing subtraction on all elements.
 *
 * @param string The string from which the tuple is to be created.
 * @param subtractValue The value to subtract from each element of the tuple.
 * @return The resulting tuple after subtracting the value from each element.
 *
 * Examples:
 * createTupleFromStringAndSubtract("5,9,2,7", 3) -> (2, 6, -1, 4)
 * createTupleFromStringAndSubtract("10,4,8", 2) -> (8, 2, 6)
 */
fun createTupleFromStringAndSubtract(string: String, subtractValue: Int): List<Int> {

    // Split the string into individual elements
    val elements = string.split(",").map { it.toInt() }

    // Perform subtraction on each element of the tuple
    val resultTuple = elements.map { it - subtractValue }

    return resultTuple
}