/**
 * This function takes a dictionary of sales data with product names as keys and lists of sales
 * amounts as values. The function calculates the total revenue by summing all the sales amounts
 * across all products.
 *
 * @param salesData A dictionary with product names as keys and lists of sales amounts as values
 * @return The sum of all sales amounts across all products
 */
fun calculateTotalRevenue(salesData: Map<String, List<Int>>): Int {

    var totalRevenue = 0

    // Iterate over each product in the sales data dictionary
    for ((_, saleAmounts) in salesData) {
        // Iterate over each sale amount for the current product
        for (saleAmount in saleAmounts) {
            // Add the sale amount to the total revenue
            totalRevenue += saleAmount
        }
    }

    return totalRevenue
}

// Example Usage

// Define the sales data dictionary
val salesData = mapOf(
    "Product A" to listOf(10, 20, 30),
    "Product B" to listOf(15, 25, 35),
    "Product C" to listOf(5, 10, 15)
)

// Call the function to calculate the total revenue
val result = calculateTotalRevenue(salesData)
/**
 * This function takes a dictionary of sales data with product names as keys and lists of sales
 * amounts as values. The function calculates the total revenue by summing all the sales amounts
 * across all products.
 *
 * @param salesData A dictionary with product names as keys and lists of sales amounts as values
 * @return The sum of all sales amounts across all products
 */
fun calculateTotalRevenue(salesData: Map<String, List<Int>>): Int {
/**
 * This function takes a dictionary of sales data with product names as keys and lists of sales
 * amounts as values. The function calculates the total revenue by summing all the sales amounts
 * across all products.
 *
 * @param salesData A dictionary with product names as keys and lists of sales amounts as values
 * @return The sum of all sales amounts across all products
 */
fun calculateTotalRevenue(salesData: Map<String, List<Int>>): Int {

    var totalRevenue = 0

    // Iterate over each product in the sales data dictionary
    for ((_, saleAmounts) in salesData) {
        // Iterate over each sale amount for the current product
        for (saleAmount in saleAmounts) {
            // Add the sale amount to the total revenue
            totalRevenue += saleAmount
        }
    }

    return totalRevenue
}

// Example Usage

// Define the sales data dictionary
val salesData = mapOf(
    "Product A" to listOf(10, 20, 30),
    "Product B" to listOf(15, 25, 35),
    "Product C" to listOf(5, 10, 15)
)

// Call the function to calculate the total revenue
val result = calculateTotalRevenue(salesData)