/**
 * Given a list of firefighters and their risk levels, return the number of firefighters who are at high risk.
 * Firefighters at high risk have a risk level greater than or equal to 4.
 *
 * @param firefighters A list of pairs where each pair contains the firefighter's name and their risk level.
 * @return The number of firefighters at high risk.
 *
 * Example:
 * val firefighters = listOf(Pair("John", 2), Pair("Smith", 4), Pair("Emily", 5), Pair("Daniel", 3), Pair("Amy", 6))
 * firefighterRiskLevel(firefighters) // Output: 3
 */
fun firefighterRiskLevel(firefighters: List<Pair<String, Int>>): Int {

    val highRiskFirefighters = firefighters.filter { it.second >= 4 }
    return highRiskFirefighters.size
}
/**
 * Given a list of firefighters and their risk levels, return the number of firefighters who are at high risk.
 * Firefighters at high risk have a risk level greater than or equal to 4.
 *
 * @param firefighters A list of pairs where each pair contains the firefighter's name and their risk level.
 * @return The number of firefighters at high risk.
 *
 * Example:
 * val firefighters = listOf(Pair("John", 2), Pair("Smith", 4), Pair("Emily", 5), Pair("Daniel", 3), Pair("Amy", 6))
 * firefighterRiskLevel(firefighters) // Output: 3
 */
fun firefighterRiskLevel(firefighters: List<Pair<String, Int>>): Int {
/**
 * Given a list of firefighters and their risk levels, return the number of firefighters who are at high risk.
 * Firefighters at high risk have a risk level greater than or equal to 4.
 *
 * @param firefighters A list of pairs where each pair contains the firefighter's name and their risk level.
 * @return The number of firefighters at high risk.
 *
 * Example:
 * val firefighters = listOf(Pair("John", 2), Pair("Smith", 4), Pair("Emily", 5), Pair("Daniel", 3), Pair("Amy", 6))
 * firefighterRiskLevel(firefighters) // Output: 3
 */
fun firefighterRiskLevel(firefighters: List<Pair<String, Int>>): Int {

    val highRiskFirefighters = firefighters.filter { it.second >= 4 }
    return highRiskFirefighters.size
}