/**
 * Calculate the total points earned by the athlete based on the distance they achieved in different events.
 *
 * @param athlete dictionary containing the distances achieved by the athlete in various events
 * @return total points earned by the athlete
 */
fun calculatePoints(athlete: Map<String, Int>): Int {

    var totalPoints = 0

    for ((event, distance) in athlete) {
        totalPoints += distance * when {
            distance < 10 -> 10
            distance < 20 -> 20
            distance < 30 -> 30
            else -> 40
        }
    }

    return totalPoints
}
/**
 * Calculate the total points earned by the athlete based on the distance they achieved in different events.
 *
 * @param athlete dictionary containing the distances achieved by the athlete in various events
 * @return total points earned by the athlete
 */
fun calculatePoints(athlete: Map<String, Int>): Int {
/**
 * Calculate the total points earned by the athlete based on the distance they achieved in different events.
 *
 * @param athlete dictionary containing the distances achieved by the athlete in various events
 * @return total points earned by the athlete
 */
fun calculatePoints(athlete: Map<String, Int>): Int {

    var totalPoints = 0

    for ((event, distance) in athlete) {
        totalPoints += distance * when {
            distance < 10 -> 10
            distance < 20 -> 20
            distance < 30 -> 30
            else -> 40
        }
    }

    return totalPoints
}