/**
 * You are given a map containing the statistics of an athlete. The statistics include the distances
 * covered by the athlete in different sports activities. The keys represent the activity names, and the values
 * represent the distances covered in kilometers.
 *
 * Your task is to calculate the total distance covered by the athlete across all activities. Return the total
 * distance as the output.
 *
 * @param athleteStats A map containing the distances covered in various activities.
 * @return The total distance covered by the athlete.
 *
 * Example:
 * calculateTotalDistance(mapOf("running" to 10, "cycling" to 25, "swimming" to 5)) => 40.0
 */
fun calculateTotalDistance(athleteStats: Map<String, Int>): Double {

    var totalDistance = 0.0
    // Iterate over the distances covered in each activity
    for (distance in athleteStats.values) {
        totalDistance += distance
    }
    return totalDistance
}
/**
 * You are given a map containing the statistics of an athlete. The statistics include the distances
 * covered by the athlete in different sports activities. The keys represent the activity names, and the values
 * represent the distances covered in kilometers.
 *
 * Your task is to calculate the total distance covered by the athlete across all activities. Return the total
 * distance as the output.
 *
 * @param athleteStats A map containing the distances covered in various activities.
 * @return The total distance covered by the athlete.
 *
 * Example:
 * calculateTotalDistance(mapOf("running" to 10, "cycling" to 25, "swimming" to 5)) => 40.0
 */
fun calculateTotalDistance(athleteStats: Map<String, Int>): Double {
/**
 * You are given a map containing the statistics of an athlete. The statistics include the distances
 * covered by the athlete in different sports activities. The keys represent the activity names, and the values
 * represent the distances covered in kilometers.
 *
 * Your task is to calculate the total distance covered by the athlete across all activities. Return the total
 * distance as the output.
 *
 * @param athleteStats A map containing the distances covered in various activities.
 * @return The total distance covered by the athlete.
 *
 * Example:
 * calculateTotalDistance(mapOf("running" to 10, "cycling" to 25, "swimming" to 5)) => 40.0
 */
fun calculateTotalDistance(athleteStats: Map<String, Int>): Double {

    var totalDistance = 0.0
    // Iterate over the distances covered in each activity
    for (distance in athleteStats.values) {
        totalDistance += distance
    }
    return totalDistance
}