/**
 * Given a dictionary of sales data, calculate the total sales for each category and return a new dictionary
 * where the keys are the categories and the values are the total sales.
 *
 * @param salesData A dictionary where the keys represent the categories (strings) and the values represent
 *                  the sales (lists of integers) for each category.
 * @return A dictionary where the keys are the categories and the values are the total sales for each category.
 */
fun calculateTotalSales(salesData: Map<String, List<Int>>): Map<String, Int> {

    val totalSales = mutableMapOf<String, Int>()
    for ((category, sales) in salesData) {
        totalSales[category] = 0
        for (sale in sales) {
            totalSales[category] = totalSales[category]!! + sale
        }
    }
    return totalSales
}
/**
 * Given a dictionary of sales data, calculate the total sales for each category and return a new dictionary
 * where the keys are the categories and the values are the total sales.
 *
 * @param salesData A dictionary where the keys represent the categories (strings) and the values represent
 *                  the sales (lists of integers) for each category.
 * @return A dictionary where the keys are the categories and the values are the total sales for each category.
 */
fun calculateTotalSales(salesData: Map<String, List<Int>>): Map<String, Int> {
/**
 * Given a dictionary of sales data, calculate the total sales for each category and return a new dictionary
 * where the keys are the categories and the values are the total sales.
 *
 * @param salesData A dictionary where the keys represent the categories (strings) and the values represent
 *                  the sales (lists of integers) for each category.
 * @return A dictionary where the keys are the categories and the values are the total sales for each category.
 */
fun calculateTotalSales(salesData: Map<String, List<Int>>): Map<String, Int> {

    val totalSales = mutableMapOf<String, Int>()
    for ((category, sales) in salesData) {
        totalSales[category] = 0
        for (sale in sales) {
            totalSales[category] = totalSales[category]!! + sale
        }
    }
    return totalSales
}