/**
 * This function calculates the number of wood pieces a carpenter can cut from a given length of wood,
 * using the specified cut length.
 *
 * @param lengthWood The total length of the wood.
 * @param pieces The desired number of wood pieces.
 * @param cutLength The length of each cut.
 * @return The maximum number of wood pieces that can be obtained from the given length of wood.
 */
fun calculateCarpenterCuts(lengthWood: Int, pieces: Int, cutLength: Int): Int {

    var cuts = 0
    var remainingLength = lengthWood
    var remainingPieces = pieces

    while (remainingLength >= cutLength && remainingPieces > 0) {
        remainingLength -= cutLength
        remainingPieces--
        cuts++
    }

    return cuts
}
/**
 * This function calculates the number of wood pieces a carpenter can cut from a given length of wood,
 * using the specified cut length.
 *
 * @param lengthWood The total length of the wood.
 * @param pieces The desired number of wood pieces.
 * @param cutLength The length of each cut.
 * @return The maximum number of wood pieces that can be obtained from the given length of wood.
 */
fun calculateCarpenterCuts(lengthWood: Int, pieces: Int, cutLength: Int): Int {
/**
 * This function calculates the number of wood pieces a carpenter can cut from a given length of wood,
 * using the specified cut length.
 *
 * @param lengthWood The total length of the wood.
 * @param pieces The desired number of wood pieces.
 * @param cutLength The length of each cut.
 * @return The maximum number of wood pieces that can be obtained from the given length of wood.
 */
fun calculateCarpenterCuts(lengthWood: Int, pieces: Int, cutLength: Int): Int {

    var cuts = 0
    var remainingLength = lengthWood
    var remainingPieces = pieces

    while (remainingLength >= cutLength && remainingPieces > 0) {
        remainingLength -= cutLength
        remainingPieces--
        cuts++
    }

    return cuts
}