/**
 * This function calculates the points scored by the athlete based on their time and distance.
 */
fun calculatePoints(time: Int, distance: Int): Int {

    var points = 0

    // Nested if-else statements to determine the points scored
    if (time < 10) {
        if (distance > 20) {
            points *= 2
        } else {
            points += 10
        }
    } else if (time < 20) {
        if (distance > 15) {
            points -= 5
        } else {
            points += 5
        }
    } else {
        if (distance > 10) {
            points -= 10
        } else {
            points -= 20
        }
    }

    return points
}
/**
 * This function calculates the points scored by the athlete based on their time and distance.
 */
fun calculatePoints(time: Int, distance: Int): Int {
/**
 * This function calculates the points scored by the athlete based on their time and distance.
 */
fun calculatePoints(time: Int, distance: Int): Int {

    var points = 0

    // Nested if-else statements to determine the points scored
    if (time < 10) {
        if (distance > 20) {
            points *= 2
        } else {
            points += 10
        }
    } else if (time < 20) {
        if (distance > 15) {
            points -= 5
        } else {
            points += 5
        }
    } else {
        if (distance > 10) {
            points -= 10
        } else {
            points -= 20
        }
    }

    return points
}