/**
 * As a veterinarian, you have a list of animals scheduled for visits.
 * You need to determine if an animal is visiting the clinic in an inclusive range of hours from 8 AM to 5 PM,
 * but excluding the lunch break from 12 PM to 1 PM.
 * Your task is to complete the code to check if each animal's visit time falls within the inclusive range.
 * If the visit time does not fall within the valid range, the animal's name should be added to the 'missedVisits' list.
 * Finally, the function should return the number of animals whose visits were missed.
 *
 * @param animals A list of pairs where each pair contains the animal's name and the visit time in 24-hour format.
 * @return The number of animals whose visits were missed.
 */
fun vetVisits(animals: List<Pair<String, String>>): Int {

    val missedVisits = mutableListOf<String>()

    for ((animal, visitTime) in animals) {
        val hour = visitTime.split(":")[0].toInt()

        if (hour in 8 until 12 || hour in 13 until 17) {
            continue
        } else {
            missedVisits.add(animal)
        }
    }

    return missedVisits.size
}
/**
 * As a veterinarian, you have a list of animals scheduled for visits.
 * You need to determine if an animal is visiting the clinic in an inclusive range of hours from 8 AM to 5 PM,
 * but excluding the lunch break from 12 PM to 1 PM.
 * Your task is to complete the code to check if each animal's visit time falls within the inclusive range.
 * If the visit time does not fall within the valid range, the animal's name should be added to the 'missedVisits' list.
 * Finally, the function should return the number of animals whose visits were missed.
 *
 * @param animals A list of pairs where each pair contains the animal's name and the visit time in 24-hour format.
 * @return The number of animals whose visits were missed.
 */
fun vetVisits(animals: List<Pair<String, String>>): Int {
/**
 * As a veterinarian, you have a list of animals scheduled for visits.
 * You need to determine if an animal is visiting the clinic in an inclusive range of hours from 8 AM to 5 PM,
 * but excluding the lunch break from 12 PM to 1 PM.
 * Your task is to complete the code to check if each animal's visit time falls within the inclusive range.
 * If the visit time does not fall within the valid range, the animal's name should be added to the 'missedVisits' list.
 * Finally, the function should return the number of animals whose visits were missed.
 *
 * @param animals A list of pairs where each pair contains the animal's name and the visit time in 24-hour format.
 * @return The number of animals whose visits were missed.
 */
fun vetVisits(animals: List<Pair<String, String>>): Int {

    val missedVisits = mutableListOf<String>()

    for ((animal, visitTime) in animals) {
        val hour = visitTime.split(":")[0].toInt()

        if (hour in 8 until 12 || hour in 13 until 17) {
            continue
        } else {
            missedVisits.add(animal)
        }
    }

    return missedVisits.size
}