/**
 * This function takes a map of rectangles and calculates the area of each rectangle.
 * The map contains the length and width of each rectangle.
 *
 * Example:
 * val rectangles = mapOf("rectangle1" to listOf(5, 3), "rectangle2" to listOf(8, 4))
 * calculateAreas(rectangles) => mapOf("rectangle1" to 15, "rectangle2" to 32)
 */
fun calculateAreas(rectangles: Map<String, List<Int>>): Map<String, Int> {

    val areas = mutableMapOf<String, Int>()
    for ((rectangle, dimensions) in rectangles) {
        val length = dimensions[0]
        val width = dimensions[1]
        val area = length * width
        areas[rectangle] = area
    }
    return areas
}
/**
 * This function takes a map of rectangles and calculates the area of each rectangle.
 * The map contains the length and width of each rectangle.
 *
 * Example:
 * val rectangles = mapOf("rectangle1" to listOf(5, 3), "rectangle2" to listOf(8, 4))
 * calculateAreas(rectangles) => mapOf("rectangle1" to 15, "rectangle2" to 32)
 */
fun calculateAreas(rectangles: Map<String, List<Int>>): Map<String, Int> {
/**
 * This function takes a map of rectangles and calculates the area of each rectangle.
 * The map contains the length and width of each rectangle.
 *
 * Example:
 * val rectangles = mapOf("rectangle1" to listOf(5, 3), "rectangle2" to listOf(8, 4))
 * calculateAreas(rectangles) => mapOf("rectangle1" to 15, "rectangle2" to 32)
 */
fun calculateAreas(rectangles: Map<String, List<Int>>): Map<String, Int> {

    val areas = mutableMapOf<String, Int>()
    for ((rectangle, dimensions) in rectangles) {
        val length = dimensions[0]
        val width = dimensions[1]
        val area = length * width
        areas[rectangle] = area
    }
    return areas
}