/**
 * Given the dimensions of a room and a list of furniture items with their dimensions,
 * calculate the total cost of furniture that will fit within the room
 */
fun calculateFurnitureCost(roomDimensions: Pair<Int, Int>, furnitureList: List<Triple<Int, Int, Int>>): Int {

    var totalCost = 0  // Variable to keep track of the running total cost
    
    // Iterate through the furniture items
    for (furnitureItem in furnitureList) {
        
        // Check if the furniture item fits within the room dimensions
        if (furnitureItem.first <= roomDimensions.first && furnitureItem.second <= roomDimensions.second) {
            
            // Calculate the cost based on the furniture item dimensions
            val cost = furnitureItem.first * furnitureItem.second * furnitureItem.third
            
            // Add the cost to the total cost
            totalCost += cost
        }
    }
    
    return totalCost
}
/**
 * Given the dimensions of a room and a list of furniture items with their dimensions,
 * calculate the total cost of furniture that will fit within the room
 */
fun calculateFurnitureCost(roomDimensions: Pair<Int, Int>, furnitureList: List<Triple<Int, Int, Int>>): Int {
/**
 * Given the dimensions of a room and a list of furniture items with their dimensions,
 * calculate the total cost of furniture that will fit within the room
 */
fun calculateFurnitureCost(roomDimensions: Pair<Int, Int>, furnitureList: List<Triple<Int, Int, Int>>): Int {

    var totalCost = 0  // Variable to keep track of the running total cost
    
    // Iterate through the furniture items
    for (furnitureItem in furnitureList) {
        
        // Check if the furniture item fits within the room dimensions
        if (furnitureItem.first <= roomDimensions.first && furnitureItem.second <= roomDimensions.second) {
            
            // Calculate the cost based on the furniture item dimensions
            val cost = furnitureItem.first * furnitureItem.second * furnitureItem.third
            
            // Add the cost to the total cost
            totalCost += cost
        }
    }
    
    return totalCost
}