/**
 * Given two integers and a repetition count, concatenates the two numbers into a tuple
 * and repeats the resulting tuple according to the repetition count provided.
 *
 * @param num1 An integer value
 * @param num2 An integer value
 * @param times An integer representing the number of times the resulting tuple should be repeated
 * @return A tuple consisting of the concatenation of num1 and num2, repeated times number of times
 *
 * Example:
 * tupleConcatenationAndRepeating(5, 3, 4) -> (5, 3, 5, 3, 5, 3, 5, 3)
 * tupleConcatenationAndRepeating(11, 9, 2) -> (11, 9, 11, 9)
 */
fun tupleConcatenationAndRepeating(num1: Int, num2: Int, times: Int): List<Int> {

    val concatenatedTuple = listOf(num1, num2)  // Create a tuple by concatenating num1 and num2
    val repeatedTuple = concatenatedTuple.flatMap { List(times) { it } }  // Repeat the tuple times number of times

    return repeatedTuple
}
/**
 * Given two integers and a repetition count, concatenates the two numbers into a tuple
 * and repeats the resulting tuple according to the repetition count provided.
 *
 * @param num1 An integer value
 * @param num2 An integer value
 * @param times An integer representing the number of times the resulting tuple should be repeated
 * @return A tuple consisting of the concatenation of num1 and num2, repeated times number of times
 *
 * Example:
 * tupleConcatenationAndRepeating(5, 3, 4) -> (5, 3, 5, 3, 5, 3, 5, 3)
 * tupleConcatenationAndRepeating(11, 9, 2) -> (11, 9, 11, 9)
 */
fun tupleConcatenationAndRepeating(num1: Int, num2: Int, times: Int): List<Int> {
/**
 * Given two integers and a repetition count, concatenates the two numbers into a tuple
 * and repeats the resulting tuple according to the repetition count provided.
 *
 * @param num1 An integer value
 * @param num2 An integer value
 * @param times An integer representing the number of times the resulting tuple should be repeated
 * @return A tuple consisting of the concatenation of num1 and num2, repeated times number of times
 *
 * Example:
 * tupleConcatenationAndRepeating(5, 3, 4) -> (5, 3, 5, 3, 5, 3, 5, 3)
 * tupleConcatenationAndRepeating(11, 9, 2) -> (11, 9, 11, 9)
 */
fun tupleConcatenationAndRepeating(num1: Int, num2: Int, times: Int): List<Int> {

    val concatenatedTuple = listOf(num1, num2)  // Create a tuple by concatenating num1 and num2
    val repeatedTuple = concatenatedTuple.flatMap { List(times) { it } }  // Repeat the tuple times number of times

    return repeatedTuple
}