/**
 * This function calculates the average response time for firefighters to incidents.
 *
 * @param firefighters A list of firefighters, with each firefighter represented as a Pair with their name and response time in minutes.
 * @param incidents A list of incidents, with each incident represented as a Pair with the incident type and time in minutes.
 * @return The average response time in minutes.
 */
fun calculateAverageResponseTime(firefighters: List<Pair<String, Int>>, incidents: List<Pair<String, Int>>): Float {

    var totalResponseTime = 0
    var totalIncidents = 0

    for (firefighter in firefighters) {
        val (_, responseTime) = firefighter

        for (incident in incidents) {
            val (_, time) = incident

            totalResponseTime += responseTime * time
            totalIncidents++
        }
    }

    val averageResponseTime = totalResponseTime.toFloat() / totalIncidents

    return averageResponseTime
}
/**
 * This function calculates the average response time for firefighters to incidents.
 *
 * @param firefighters A list of firefighters, with each firefighter represented as a Pair with their name and response time in minutes.
 * @param incidents A list of incidents, with each incident represented as a Pair with the incident type and time in minutes.
 * @return The average response time in minutes.
 */
fun calculateAverageResponseTime(firefighters: List<Pair<String, Int>>, incidents: List<Pair<String, Int>>): Float {
/**
 * This function calculates the average response time for firefighters to incidents.
 *
 * @param firefighters A list of firefighters, with each firefighter represented as a Pair with their name and response time in minutes.
 * @param incidents A list of incidents, with each incident represented as a Pair with the incident type and time in minutes.
 * @return The average response time in minutes.
 */
fun calculateAverageResponseTime(firefighters: List<Pair<String, Int>>, incidents: List<Pair<String, Int>>): Float {

    var totalResponseTime = 0
    var totalIncidents = 0

    for (firefighter in firefighters) {
        val (_, responseTime) = firefighter

        for (incident in incidents) {
            val (_, time) = incident

            totalResponseTime += responseTime * time
            totalIncidents++
        }
    }

    val averageResponseTime = totalResponseTime.toFloat() / totalIncidents

    return averageResponseTime
}