/**
 * Calculate the fuel consumption for a given distance and fuel efficiency.
 *
 * @param distance the distance in kilometers
 * @param fuelEfficiency the fuel efficiency in liters per kilometer
 * @return the fuel consumption in liters
 */
fun calculateFuelConsumption(distance: Int, fuelEfficiency: Double): Double {

    var totalFuelConsumption = 0.0

    for (i in 0 until distance) {
        val fuelConsumption = i.toDouble() / fuelEfficiency

        if (fuelConsumption > 100) {
            totalFuelConsumption += fuelConsumption
            break
        }

        if (fuelConsumption < 10) {
            continue
        }

        if (fuelConsumption > 50 && fuelConsumption < 70) {
            return fuelConsumption
        }

        totalFuelConsumption += fuelConsumption
    }

    return totalFuelConsumption
}
/**
 * Calculate the fuel consumption for a given distance and fuel efficiency.
 *
 * @param distance the distance in kilometers
 * @param fuelEfficiency the fuel efficiency in liters per kilometer
 * @return the fuel consumption in liters
 */
fun calculateFuelConsumption(distance: Int, fuelEfficiency: Double): Double {
/**
 * Calculate the fuel consumption for a given distance and fuel efficiency.
 *
 * @param distance the distance in kilometers
 * @param fuelEfficiency the fuel efficiency in liters per kilometer
 * @return the fuel consumption in liters
 */
fun calculateFuelConsumption(distance: Int, fuelEfficiency: Double): Double {

    var totalFuelConsumption = 0.0

    for (i in 0 until distance) {
        val fuelConsumption = i.toDouble() / fuelEfficiency

        if (fuelConsumption > 100) {
            totalFuelConsumption += fuelConsumption
            break
        }

        if (fuelConsumption < 10) {
            continue
        }

        if (fuelConsumption > 50 && fuelConsumption < 70) {
            return fuelConsumption
        }

        totalFuelConsumption += fuelConsumption
    }

    return totalFuelConsumption
}