/**
 * Modify the stats of the athlete in the athlete list.
 *
 * Given a list of athlete dictionaries containing their stats, update the 'score' and 'rank'
 * keys for each athlete. The score should be incremented by 10 for each rank, starting from 1,
 * and the rank should be the index of the athlete in the list plus 1.
 *
 * @param athleteList List of athlete dictionaries, where each dictionary contains the athlete's
 * name, score, and rank.
 * @return Updated list of athlete dictionaries with modified stats.
 */
fun modifyAthleteStats(athleteList: List<MutableMap<String, Any>>): List<MutableMap<String, Any>> {

    for (i in athleteList.indices) {
        athleteList[i]["rank"] = i + 1
        athleteList[i]["score"] = (athleteList[i]["score"] as Int) + (i + 1) * 10
    }
    return athleteList
}
/**
 * Modify the stats of the athlete in the athlete list.
 *
 * Given a list of athlete dictionaries containing their stats, update the 'score' and 'rank'
 * keys for each athlete. The score should be incremented by 10 for each rank, starting from 1,
 * and the rank should be the index of the athlete in the list plus 1.
 *
 * @param athleteList List of athlete dictionaries, where each dictionary contains the athlete's
 * name, score, and rank.
 * @return Updated list of athlete dictionaries with modified stats.
 */
fun modifyAthleteStats(athleteList: List<MutableMap<String, Any>>): List<MutableMap<String, Any>> {
/**
 * Modify the stats of the athlete in the athlete list.
 *
 * Given a list of athlete dictionaries containing their stats, update the 'score' and 'rank'
 * keys for each athlete. The score should be incremented by 10 for each rank, starting from 1,
 * and the rank should be the index of the athlete in the list plus 1.
 *
 * @param athleteList List of athlete dictionaries, where each dictionary contains the athlete's
 * name, score, and rank.
 * @return Updated list of athlete dictionaries with modified stats.
 */
fun modifyAthleteStats(athleteList: List<MutableMap<String, Any>>): List<MutableMap<String, Any>> {

    for (i in athleteList.indices) {
        athleteList[i]["rank"] = i + 1
        athleteList[i]["score"] = (athleteList[i]["score"] as Int) + (i + 1) * 10
    }
    return athleteList
}