/**
 * Given a dictionary of carpentry materials and their quantities,
 * concatenate the names of all materials and return the result as a string.
 *
 * @param dictionary A dictionary containing carpentry materials and their quantities.
 * @return The concatenated string of all material names.
 *
 * Example:
 * combineDictionaryValues(mapOf("wood" to 5, "nails" to 100, "screws" to 50))
 * Output: "woodnailsscrews"
 */
fun combineDictionaryValues(dictionary: Map<String, Int>): String {

    var concatenatedString = ""
    for ((key, value) in dictionary) {
        concatenatedString += key.repeat(value)
    }
    return concatenatedString
}
/**
 * Given a dictionary of carpentry materials and their quantities,
 * concatenate the names of all materials and return the result as a string.
 *
 * @param dictionary A dictionary containing carpentry materials and their quantities.
 * @return The concatenated string of all material names.
 *
 * Example:
 * combineDictionaryValues(mapOf("wood" to 5, "nails" to 100, "screws" to 50))
 * Output: "woodnailsscrews"
 */
fun combineDictionaryValues(dictionary: Map<String, Int>): String {
/**
 * Given a dictionary of carpentry materials and their quantities,
 * concatenate the names of all materials and return the result as a string.
 *
 * @param dictionary A dictionary containing carpentry materials and their quantities.
 * @return The concatenated string of all material names.
 *
 * Example:
 * combineDictionaryValues(mapOf("wood" to 5, "nails" to 100, "screws" to 50))
 * Output: "woodnailsscrews"
 */
fun combineDictionaryValues(dictionary: Map<String, Int>): String {

    var concatenatedString = ""
    for ((key, value) in dictionary) {
        concatenatedString += key.repeat(value)
    }
    return concatenatedString
}