/**
 * Given a list of integers, combines all the numbers into a single number by concatenating their digits
 * and returns a slice of the combined number from the start index to the end index.
 */
fun combineAndSlice(data: List<Int>, startIndex: Int, endIndex: Int): List<Int> {

    val combinedNumber = data.joinToString("").toInt()
    val combinedNumberStr = combinedNumber.toString()
    
    return combinedNumberStr.substring(startIndex, endIndex).map { it.toString().toInt() }
}
/**
 * Given a list of integers, combines all the numbers into a single number by concatenating their digits
 * and returns a slice of the combined number from the start index to the end index.
 */
fun combineAndSlice(data: List<Int>, startIndex: Int, endIndex: Int): List<Int> {
/**
 * Given a list of integers, combines all the numbers into a single number by concatenating their digits
 * and returns a slice of the combined number from the start index to the end index.
 */
fun combineAndSlice(data: List<Int>, startIndex: Int, endIndex: Int): List<Int> {

    val combinedNumber = data.joinToString("").toInt()
    val combinedNumberStr = combinedNumber.toString()
    
    return combinedNumberStr.substring(startIndex, endIndex).map { it.toString().toInt() }
}