/**
 * Calculate the total inflation for each year in the given inflationData map.
 *
 * @param inflationData A map containing inflation rates for different years.
 * @return A new map with total inflation for each year.
 */
fun calculateTotalInflation(inflationData: Map<Int, List<Double>>): Map<Int, Double> {

    val totalInflation = mutableMapOf<Int, Double>()
    for ((year, rates) in inflationData) {
        val total = rates.sum()
        totalInflation[year] = total
    }
    return totalInflation
}
/**
 * Calculate the total inflation for each year in the given inflationData map.
 *
 * @param inflationData A map containing inflation rates for different years.
 * @return A new map with total inflation for each year.
 */
fun calculateTotalInflation(inflationData: Map<Int, List<Double>>): Map<Int, Double> {
/**
 * Calculate the total inflation for each year in the given inflationData map.
 *
 * @param inflationData A map containing inflation rates for different years.
 * @return A new map with total inflation for each year.
 */
fun calculateTotalInflation(inflationData: Map<Int, List<Double>>): Map<Int, Double> {

    val totalInflation = mutableMapOf<Int, Double>()
    for ((year, rates) in inflationData) {
        val total = rates.sum()
        totalInflation[year] = total
    }
    return totalInflation
}