/**
 * Given a list of items purchased by a fashion designer,
 * calculate the total cost of the items, taking into
 * consideration any applicable discounts.
 *
 * @param items a list of pairs, each containing the item name
 *              and its price.
 * @return The total cost of the items after applying any discounts.
 */
fun calculateTotalCost(items: List<Pair<String, Double>>): Double {

    var totalCost = 0.0
    for (item in items) {
        val (item_name, item_price) = item

        when (item_name) {
            "dress" -> totalCost += item_price * 1.1
            "pants" -> totalCost += item_price * 0.9
            "shirt" -> {
                if (item_price > 50) {
                    totalCost += item_price * 0.8
                } else {
                    totalCost += item_price
                }
            }
            else -> totalCost += item_price
        }
    }
    return totalCost
}
/**
 * Given a list of items purchased by a fashion designer,
 * calculate the total cost of the items, taking into
 * consideration any applicable discounts.
 *
 * @param items a list of pairs, each containing the item name
 *              and its price.
 * @return The total cost of the items after applying any discounts.
 */
fun calculateTotalCost(items: List<Pair<String, Double>>): Double {
/**
 * Given a list of items purchased by a fashion designer,
 * calculate the total cost of the items, taking into
 * consideration any applicable discounts.
 *
 * @param items a list of pairs, each containing the item name
 *              and its price.
 * @return The total cost of the items after applying any discounts.
 */
fun calculateTotalCost(items: List<Pair<String, Double>>): Double {

    var totalCost = 0.0
    for (item in items) {
        val (item_name, item_price) = item

        when (item_name) {
            "dress" -> totalCost += item_price * 1.1
            "pants" -> totalCost += item_price * 0.9
            "shirt" -> {
                if (item_price > 50) {
                    totalCost += item_price * 0.8
                } else {
                    totalCost += item_price
                }
            }
            else -> totalCost += item_price
        }
    }
    return totalCost
}