/**
 * Given a list of strings and a number of repetitions, creates a new string by concatenating all the strings in the list
 * and repeating the resulting string 'repeat' number of times.
 *
 * Example:
 * strings = ['mountain', 'river', 'forest']
 * repeat = 3
 *
 * Consequently, the resulting string would be 'mountainriverforestmountainriverforestmountainriverforest'.
 *
 * @param strings List of strings to concatenate
 * @param repeat Number of times to repeat the concatenated string
 * @return The final concatenated and repeated string
 */
fun concatenateAndRepeatStrings(strings: List<String>, repeat: Int): String {

    // Concatenating the strings
    var concatenatedString = ""
    for (string in strings) {
        concatenatedString += string
    }

    // Repeating the concatenated string
    var finalString = ""
    repeat(repeat) {
        finalString += concatenatedString
    }

    return finalString
}
/**
 * Given a list of strings and a number of repetitions, creates a new string by concatenating all the strings in the list
 * and repeating the resulting string 'repeat' number of times.
 *
 * Example:
 * strings = ['mountain', 'river', 'forest']
 * repeat = 3
 *
 * Consequently, the resulting string would be 'mountainriverforestmountainriverforestmountainriverforest'.
 *
 * @param strings List of strings to concatenate
 * @param repeat Number of times to repeat the concatenated string
 * @return The final concatenated and repeated string
 */
fun concatenateAndRepeatStrings(strings: List<String>, repeat: Int): String {
/**
 * Given a list of strings and a number of repetitions, creates a new string by concatenating all the strings in the list
 * and repeating the resulting string 'repeat' number of times.
 *
 * Example:
 * strings = ['mountain', 'river', 'forest']
 * repeat = 3
 *
 * Consequently, the resulting string would be 'mountainriverforestmountainriverforestmountainriverforest'.
 *
 * @param strings List of strings to concatenate
 * @param repeat Number of times to repeat the concatenated string
 * @return The final concatenated and repeated string
 */
fun concatenateAndRepeatStrings(strings: List<String>, repeat: Int): String {

    // Concatenating the strings
    var concatenatedString = ""
    for (string in strings) {
        concatenatedString += string
    }

    // Repeating the concatenated string
    var finalString = ""
    repeat(repeat) {
        finalString += concatenatedString
    }

    return finalString
}