/**
 * This function calculates the total distance covered by dancers in a list, considering only those who have moved
 * a distance greater than or equal to the minimum distance provided.
 *
 * @param dancerList A list containing the distances covered by each dancer.
 * @param minDistance The minimum distance required to consider a dancer's movement.
 * @return The sum of distances covered by the dancers who have moved at least the minimum distance.
 */
fun calculateTotalDistance(dancerList: List<Int>, minDistance: Int): Int {

    var totalDistance = 0

    for (distance in dancerList) {
        if (distance >= minDistance) {
            totalDistance += distance
        }
    }

    return totalDistance
}
/**
 * This function calculates the total distance covered by dancers in a list, considering only those who have moved
 * a distance greater than or equal to the minimum distance provided.
 *
 * @param dancerList A list containing the distances covered by each dancer.
 * @param minDistance The minimum distance required to consider a dancer's movement.
 * @return The sum of distances covered by the dancers who have moved at least the minimum distance.
 */
fun calculateTotalDistance(dancerList: List<Int>, minDistance: Int): Int {
/**
 * This function calculates the total distance covered by dancers in a list, considering only those who have moved
 * a distance greater than or equal to the minimum distance provided.
 *
 * @param dancerList A list containing the distances covered by each dancer.
 * @param minDistance The minimum distance required to consider a dancer's movement.
 * @return The sum of distances covered by the dancers who have moved at least the minimum distance.
 */
fun calculateTotalDistance(dancerList: List<Int>, minDistance: Int): Int {

    var totalDistance = 0

    for (distance in dancerList) {
        if (distance >= minDistance) {
            totalDistance += distance
        }
    }

    return totalDistance
}