/**
 * Given a string [text] and an integer [times], multiplies the string by [times] and assigns the result back to [text].
 *
 * @param text The input string.
 * @param times The number of times the string should be multiplied.
 * @return The updated string after multiplying it by [times].
 *
 * Example:
 * multiplyAndAssign("abc", 3) -> "abcabcabc"
 */
fun multiplyAndAssign(text: String, times: Int): String {

    var result = text
    repeat(times - 1) {
        result += text
    }
    return result
}
/**
 * Given a string [text] and an integer [times], multiplies the string by [times] and assigns the result back to [text].
 *
 * @param text The input string.
 * @param times The number of times the string should be multiplied.
 * @return The updated string after multiplying it by [times].
 *
 * Example:
 * multiplyAndAssign("abc", 3) -> "abcabcabc"
 */
fun multiplyAndAssign(text: String, times: Int): String {
/**
 * Given a string [text] and an integer [times], multiplies the string by [times] and assigns the result back to [text].
 *
 * @param text The input string.
 * @param times The number of times the string should be multiplied.
 * @return The updated string after multiplying it by [times].
 *
 * Example:
 * multiplyAndAssign("abc", 3) -> "abcabcabc"
 */
fun multiplyAndAssign(text: String, times: Int): String {

    var result = text
    repeat(times - 1) {
        result += text
    }
    return result
}