/**
 * This function calculates the number of pizza slices each chef gets when dividing the slices equally among them.
 *
 * @param pizzaSlices Total number of pizza slices available
 * @param numChefs Number of chefs to distribute the pizza slices
 * @return Number of pizza slices each chef gets
 */
fun cookPizzaSlices(pizzaSlices: Int, numChefs: Int): Int {

    var slicesPerChef = 0
    var remainingSlices = pizzaSlices
    var chefs = numChefs

    while (remainingSlices > 0) {
        slicesPerChef++
        remainingSlices--
        if (slicesPerChef % chefs == 0) {
            slicesPerChef = 0
            chefs--
        }
        if (chefs == 0) {
            break
        }
    }
    return slicesPerChef
}
/**
 * This function calculates the number of pizza slices each chef gets when dividing the slices equally among them.
 *
 * @param pizzaSlices Total number of pizza slices available
 * @param numChefs Number of chefs to distribute the pizza slices
 * @return Number of pizza slices each chef gets
 */
fun cookPizzaSlices(pizzaSlices: Int, numChefs: Int): Int {
/**
 * This function calculates the number of pizza slices each chef gets when dividing the slices equally among them.
 *
 * @param pizzaSlices Total number of pizza slices available
 * @param numChefs Number of chefs to distribute the pizza slices
 * @return Number of pizza slices each chef gets
 */
fun cookPizzaSlices(pizzaSlices: Int, numChefs: Int): Int {

    var slicesPerChef = 0
    var remainingSlices = pizzaSlices
    var chefs = numChefs

    while (remainingSlices > 0) {
        slicesPerChef++
        remainingSlices--
        if (slicesPerChef % chefs == 0) {
            slicesPerChef = 0
            chefs--
        }
        if (chefs == 0) {
            break
        }
    }
    return slicesPerChef
}