/**
 * Given the name and scores of an athlete, this function calculates the total score and the average score.
 *
 * @param name The name of the athlete.
 * @param score The list of scores in each event.
 * @return A Pair containing the total score and the average score.
 */
fun athleteDetails(name: String, score: List<Int>): Pair<Int, Double> {

    var totalScore = 0
    var averageScore = 0.0

    for (char in name) {
        var i = 0
        while (i < score.size) {
            totalScore += score[i]
            i++
        }
    }

    averageScore = totalScore.toDouble() / score.size

    return Pair(totalScore, averageScore)
}
/**
 * Given the name and scores of an athlete, this function calculates the total score and the average score.
 *
 * @param name The name of the athlete.
 * @param score The list of scores in each event.
 * @return A Pair containing the total score and the average score.
 */
fun athleteDetails(name: String, score: List<Int>): Pair<Int, Double> {
/**
 * Given the name and scores of an athlete, this function calculates the total score and the average score.
 *
 * @param name The name of the athlete.
 * @param score The list of scores in each event.
 * @return A Pair containing the total score and the average score.
 */
fun athleteDetails(name: String, score: List<Int>): Pair<Int, Double> {

    var totalScore = 0
    var averageScore = 0.0

    for (char in name) {
        var i = 0
        while (i < score.size) {
            totalScore += score[i]
            i++
        }
    }

    averageScore = totalScore.toDouble() / score.size

    return Pair(totalScore, averageScore)
}