/**
 * Given a tuple and a number, return a new tuple that repeats the original tuple n times.
 *
 * @param tup The input tuple.
 * @param n The number of times the tuple needs to be repeated.
 * @return The new tuple with repeated elements.
 */
fun multiplyTuple(tup: List<Any>, n: Int): List<Any> {

    // Multiply the tuple by n using concatenation technique
    val newTuple = tup.flatMap { List(n) { it } }
    return newTuple
}
/**
 * Given a tuple and a number, return a new tuple that repeats the original tuple n times.
 *
 * @param tup The input tuple.
 * @param n The number of times the tuple needs to be repeated.
 * @return The new tuple with repeated elements.
 */
fun multiplyTuple(tup: List<Any>, n: Int): List<Any> {
/**
 * Given a tuple and a number, return a new tuple that repeats the original tuple n times.
 *
 * @param tup The input tuple.
 * @param n The number of times the tuple needs to be repeated.
 * @return The new tuple with repeated elements.
 */
fun multiplyTuple(tup: List<Any>, n: Int): List<Any> {

    // Multiply the tuple by n using concatenation technique
    val newTuple = tup.flatMap { List(n) { it } }
    return newTuple
}