/**
 * This function calculates the final crop yield after a certain number of growth cycles.
 * The crop yield is calculated based on the initial crop yield, the growth factor, and the size of the farm area.
 */
fun cropYield(farmArea: Int, initialCrop: Int, growthFactor: Double): Pair<Int, Int> {

    var cropCount = 0
    var growthCycles = 0

    while (cropCount < farmArea) {
        val nextCrop = initialCrop * growthFactor

        cropCount += if (cropCount + nextCrop <= farmArea) {
            nextCrop.toInt()
        } else {
            farmArea - cropCount
        }

        growthCycles++
    }

    return Pair(cropCount, growthCycles)
}
/**
 * This function calculates the final crop yield after a certain number of growth cycles.
 * The crop yield is calculated based on the initial crop yield, the growth factor, and the size of the farm area.
 */
fun cropYield(farmArea: Int, initialCrop: Int, growthFactor: Double): Pair<Int, Int> {
/**
 * This function calculates the final crop yield after a certain number of growth cycles.
 * The crop yield is calculated based on the initial crop yield, the growth factor, and the size of the farm area.
 */
fun cropYield(farmArea: Int, initialCrop: Int, growthFactor: Double): Pair<Int, Int> {

    var cropCount = 0
    var growthCycles = 0

    while (cropCount < farmArea) {
        val nextCrop = initialCrop * growthFactor

        cropCount += if (cropCount + nextCrop <= farmArea) {
            nextCrop.toInt()
        } else {
            farmArea - cropCount
        }

        growthCycles++
    }

    return Pair(cropCount, growthCycles)
}