/**
 * Given a dictionary of countries keyed by continents, the function should determine the total number
 * of countries present in all continents.
 *
 * @param data A dictionary where keys are continents and values are lists of countries in that continent.
 * @return The total number of countries present in all continents.
 */
fun countCountriesEconomist(data: Map<String, List<String>>): Int {

    var totalCountries = 0

    // Iterate over each continent
    for (continent in data) {
        // Iterate over each country in the continent
        for (country in data[continent.key]!!) {
            // Increment the count
            totalCountries++
        }
    }

    return totalCountries
}
/**
 * Given a dictionary of countries keyed by continents, the function should determine the total number
 * of countries present in all continents.
 *
 * @param data A dictionary where keys are continents and values are lists of countries in that continent.
 * @return The total number of countries present in all continents.
 */
fun countCountriesEconomist(data: Map<String, List<String>>): Int {
/**
 * Given a dictionary of countries keyed by continents, the function should determine the total number
 * of countries present in all continents.
 *
 * @param data A dictionary where keys are continents and values are lists of countries in that continent.
 * @return The total number of countries present in all continents.
 */
fun countCountriesEconomist(data: Map<String, List<String>>): Int {

    var totalCountries = 0

    // Iterate over each continent
    for (continent in data) {
        // Iterate over each country in the continent
        for (country in data[continent.key]!!) {
            // Increment the count
            totalCountries++
        }
    }

    return totalCountries
}