/**
 * Calculate the total cost of paint required for a given number of walls, paint per wall, and price per gallon.
 *
 * @param numWalls Number of walls to be painted
 * @param paintPerWall List of the amount of paint (in gallons) required for each wall
 * @param pricePerGallon Price per gallon of paint
 * @return Total cost of paint required
 */
fun calculateTotalCost(numWalls: Int, paintPerWall: List<Double>, pricePerGallon: Double): Double {

    val totalGallons = paintPerWall.sum()

    return if (numWalls > 3) {
        numWalls * pricePerGallon
    } else if (totalGallons > 10) {
        totalGallons * pricePerGallon
    } else {
        0.0
    }
}
/**
 * Calculate the total cost of paint required for a given number of walls, paint per wall, and price per gallon.
 *
 * @param numWalls Number of walls to be painted
 * @param paintPerWall List of the amount of paint (in gallons) required for each wall
 * @param pricePerGallon Price per gallon of paint
 * @return Total cost of paint required
 */
fun calculateTotalCost(numWalls: Int, paintPerWall: List<Double>, pricePerGallon: Double): Double {
/**
 * Calculate the total cost of paint required for a given number of walls, paint per wall, and price per gallon.
 *
 * @param numWalls Number of walls to be painted
 * @param paintPerWall List of the amount of paint (in gallons) required for each wall
 * @param pricePerGallon Price per gallon of paint
 * @return Total cost of paint required
 */
fun calculateTotalCost(numWalls: Int, paintPerWall: List<Double>, pricePerGallon: Double): Double {

    val totalGallons = paintPerWall.sum()

    return if (numWalls > 3) {
        numWalls * pricePerGallon
    } else if (totalGallons > 10) {
        totalGallons * pricePerGallon
    } else {
        0.0
    }
}