/**
 * Given a map 'patients' with patient names as keys and ages as values,
 * counts the number of patients falling into the specified age range.
 *
 * @param patients A map containing patient names as keys and ages as values.
 * @return A Pair of two integers representing the count of patients falling into the inclusive range
 * and exclusive range, respectively.
 */
fun countPatientsByAgeRange(patients: Map<String, Int>): Pair<Int, Int> {

    var countInclusiveRange = 0
    var countExclusiveRange = 0

    for (age in patients.values) {
        if (age in 18..65) {
            countInclusiveRange++
        }
        if (age > 18 && age < 65) {
            countExclusiveRange++
        }
    }

    return Pair(countInclusiveRange, countExclusiveRange)
}
/**
 * Given a map 'patients' with patient names as keys and ages as values,
 * counts the number of patients falling into the specified age range.
 *
 * @param patients A map containing patient names as keys and ages as values.
 * @return A Pair of two integers representing the count of patients falling into the inclusive range
 * and exclusive range, respectively.
 */
fun countPatientsByAgeRange(patients: Map<String, Int>): Pair<Int, Int> {
/**
 * Given a map 'patients' with patient names as keys and ages as values,
 * counts the number of patients falling into the specified age range.
 *
 * @param patients A map containing patient names as keys and ages as values.
 * @return A Pair of two integers representing the count of patients falling into the inclusive range
 * and exclusive range, respectively.
 */
fun countPatientsByAgeRange(patients: Map<String, Int>): Pair<Int, Int> {

    var countInclusiveRange = 0
    var countExclusiveRange = 0

    for (age in patients.values) {
        if (age in 18..65) {
            countInclusiveRange++
        }
        if (age > 18 && age < 65) {
            countExclusiveRange++
        }
    }

    return Pair(countInclusiveRange, countExclusiveRange)
}