/**
 * A Fashion Designer wants to calculate the total cost of purchasing a list of items,
 * taking into account any available discounts.
 *
 * Given a list of items and a list of discounts, the function should return the total cost.
 *
 * @param items A list of prices for each item.
 * @param discounts A list of discount values in percentage for each item.
 * @return The total cost after applying all the discounts.
 *
 * Example:
 * calculateTotalCost(listOf(100, 200, 300), listOf(10, 20, 15)) should return 495.0
 */
fun calculateTotalCost(items: List<Double>, discounts: List<Int>): Double {

    // Check if the number of items and discounts are the same
    if (items.size != discounts.size) {
        return 0.0 // You can handle this case as needed
    }

    // Initialize the total cost as 0
    var totalCost = 0.0

    // Calculate the total cost by applying discounts to each item
    for (i in items.indices) {
        val item = items[i]
        val discount = discounts[i]
        totalCost += item * (1 - discount / 100.0)
    }

    return totalCost
}
/**
 * A Fashion Designer wants to calculate the total cost of purchasing a list of items,
 * taking into account any available discounts.
 *
 * Given a list of items and a list of discounts, the function should return the total cost.
 *
 * @param items A list of prices for each item.
 * @param discounts A list of discount values in percentage for each item.
 * @return The total cost after applying all the discounts.
 *
 * Example:
 * calculateTotalCost(listOf(100, 200, 300), listOf(10, 20, 15)) should return 495.0
 */
fun calculateTotalCost(items: List<Double>, discounts: List<Int>): Double {
/**
 * A Fashion Designer wants to calculate the total cost of purchasing a list of items,
 * taking into account any available discounts.
 *
 * Given a list of items and a list of discounts, the function should return the total cost.
 *
 * @param items A list of prices for each item.
 * @param discounts A list of discount values in percentage for each item.
 * @return The total cost after applying all the discounts.
 *
 * Example:
 * calculateTotalCost(listOf(100, 200, 300), listOf(10, 20, 15)) should return 495.0
 */
fun calculateTotalCost(items: List<Double>, discounts: List<Int>): Double {

    // Check if the number of items and discounts are the same
    if (items.size != discounts.size) {
        return 0.0 // You can handle this case as needed
    }

    // Initialize the total cost as 0
    var totalCost = 0.0

    // Calculate the total cost by applying discounts to each item
    for (i in items.indices) {
        val item = items[i]
        val discount = discounts[i]
        totalCost += item * (1 - discount / 100.0)
    }

    return totalCost
}