/**
 * This function takes in the distance covered by an athlete and the time taken to cover that distance
 * and calculates the athlete's points based on the given criteria:
 * - If the distance is less than or equal to 1000 meters and the time is less than or equal to 3 minutes,
 *   the athlete gets 10 points.
 * - If the distance is greater than 1000 meters and the time is less than or equal to 6 minutes,
 *   the athlete gets 20 points.
 * - If the distance is greater than 1000 meters and the time is greater than 6 minutes,
 *   the athlete gets 7 points.
 * - If none of the above conditions apply, the athlete does not receive any points.
 */
fun calculatePoints(distance: Int, time: Int): Int {

    val points: Int = when {
        distance <= 1000 && time <= 3 -> 10
        distance > 1000 && time <= 6 -> 20
        distance > 1000 && time > 6 -> 7
        else -> 0
    }
    return points
}
/**
 * This function takes in the distance covered by an athlete and the time taken to cover that distance
 * and calculates the athlete's points based on the given criteria:
 * - If the distance is less than or equal to 1000 meters and the time is less than or equal to 3 minutes,
 *   the athlete gets 10 points.
 * - If the distance is greater than 1000 meters and the time is less than or equal to 6 minutes,
 *   the athlete gets 20 points.
 * - If the distance is greater than 1000 meters and the time is greater than 6 minutes,
 *   the athlete gets 7 points.
 * - If none of the above conditions apply, the athlete does not receive any points.
 */
fun calculatePoints(distance: Int, time: Int): Int {
/**
 * This function takes in the distance covered by an athlete and the time taken to cover that distance
 * and calculates the athlete's points based on the given criteria:
 * - If the distance is less than or equal to 1000 meters and the time is less than or equal to 3 minutes,
 *   the athlete gets 10 points.
 * - If the distance is greater than 1000 meters and the time is less than or equal to 6 minutes,
 *   the athlete gets 20 points.
 * - If the distance is greater than 1000 meters and the time is greater than 6 minutes,
 *   the athlete gets 7 points.
 * - If none of the above conditions apply, the athlete does not receive any points.
 */
fun calculatePoints(distance: Int, time: Int): Int {

    val points: Int = when {
        distance <= 1000 && time <= 3 -> 10
        distance > 1000 && time <= 6 -> 20
        distance > 1000 && time > 6 -> 7
        else -> 0
    }
    return points
}