/**
 * This function takes an athlete and a list of sets as input.
 * It then multiplies each set with the athlete's corresponding value,
 * and returns the result as a new set.
 *
 * @param athlete A map representing the athlete with their corresponding values.
 * @param sets A list of sets on which the multiplication assignment operation will be performed.
 * @return A new set obtained by multiplying each set with the athlete's corresponding value.
 */
fun multiplyAssignSets(athlete: Map<Int, Int>, sets: List<Set<Int>>): Set<Int> {

    val resultSet = mutableSetOf<Int>()
    for ((i, s) in sets.withIndex()) {
        resultSet.addAll(s.map { it * athlete.getOrDefault(i, 1) }) // Multiply set elements by athlete's value
    }
    return resultSet
}
/**
 * This function takes an athlete and a list of sets as input.
 * It then multiplies each set with the athlete's corresponding value,
 * and returns the result as a new set.
 *
 * @param athlete A map representing the athlete with their corresponding values.
 * @param sets A list of sets on which the multiplication assignment operation will be performed.
 * @return A new set obtained by multiplying each set with the athlete's corresponding value.
 */
fun multiplyAssignSets(athlete: Map<Int, Int>, sets: List<Set<Int>>): Set<Int> {
/**
 * This function takes an athlete and a list of sets as input.
 * It then multiplies each set with the athlete's corresponding value,
 * and returns the result as a new set.
 *
 * @param athlete A map representing the athlete with their corresponding values.
 * @param sets A list of sets on which the multiplication assignment operation will be performed.
 * @return A new set obtained by multiplying each set with the athlete's corresponding value.
 */
fun multiplyAssignSets(athlete: Map<Int, Int>, sets: List<Set<Int>>): Set<Int> {

    val resultSet = mutableSetOf<Int>()
    for ((i, s) in sets.withIndex()) {
        resultSet.addAll(s.map { it * athlete.getOrDefault(i, 1) }) // Multiply set elements by athlete's value
    }
    return resultSet
}