/**
 * Calculate the total distance covered by an athlete in a triathlon.
 */
fun calculateDistance(runSpeed: Double, swimSpeed: Double, bikeSpeed: Double, runTime: Double, swimTime: Double, bikeTime: Double): Double {

    val runDistance = runSpeed * runTime
    val swimDistance = swimSpeed * swimTime
    val bikeDistance = bikeSpeed * bikeTime

    val totalDistance = runDistance + swimDistance + bikeDistance

    return totalDistance
}
/**
 * Calculate the total distance covered by an athlete in a triathlon.
 */
fun calculateDistance(runSpeed: Double, swimSpeed: Double, bikeSpeed: Double, runTime: Double, swimTime: Double, bikeTime: Double): Double {
/**
 * Calculate the total distance covered by an athlete in a triathlon.
 */
fun calculateDistance(runSpeed: Double, swimSpeed: Double, bikeSpeed: Double, runTime: Double, swimTime: Double, bikeTime: Double): Double {

    val runDistance = runSpeed * runTime
    val swimDistance = swimSpeed * swimTime
    val bikeDistance = bikeSpeed * bikeTime

    val totalDistance = runDistance + swimDistance + bikeDistance

    return totalDistance
}