/**
 * You are an electrician who needs to install a cable of a certain length.
 * Given the total distance to be covered and the distance per roll of cable,
 * write a function to calculate the minimum number of cable rolls required.
 * Also, ensure that the total distance is a multiple of the distance per roll,
 * otherwise return -1 to indicate that the cable cannot be installed with available rolls.
 *
 * @param totalDistance The total distance to be covered in meters.
 * @param distancePerRoll The length of cable on a single roll in meters.
 * @return The minimum number of cable rolls required or -1 if not enough cable is available.
 *
 * Example:
 * calculateCableLength(100, 50)
 * Output: 2
 *
 * Note:
 * If the total distance is 100 meters and each roll contains 50 meters of cable,
 * then the function should return 2 as 2 rolls will be required to cover the distance.
 */
fun calculateCableLength(totalDistance: Int, distancePerRoll: Int): Int {

    if (totalDistance % distancePerRoll != 0) {
        return -1
    }
    
    return totalDistance / distancePerRoll
}
/**
 * You are an electrician who needs to install a cable of a certain length.
 * Given the total distance to be covered and the distance per roll of cable,
 * write a function to calculate the minimum number of cable rolls required.
 * Also, ensure that the total distance is a multiple of the distance per roll,
 * otherwise return -1 to indicate that the cable cannot be installed with available rolls.
 *
 * @param totalDistance The total distance to be covered in meters.
 * @param distancePerRoll The length of cable on a single roll in meters.
 * @return The minimum number of cable rolls required or -1 if not enough cable is available.
 *
 * Example:
 * calculateCableLength(100, 50)
 * Output: 2
 *
 * Note:
 * If the total distance is 100 meters and each roll contains 50 meters of cable,
 * then the function should return 2 as 2 rolls will be required to cover the distance.
 */
fun calculateCableLength(totalDistance: Int, distancePerRoll: Int): Int {
/**
 * You are an electrician who needs to install a cable of a certain length.
 * Given the total distance to be covered and the distance per roll of cable,
 * write a function to calculate the minimum number of cable rolls required.
 * Also, ensure that the total distance is a multiple of the distance per roll,
 * otherwise return -1 to indicate that the cable cannot be installed with available rolls.
 *
 * @param totalDistance The total distance to be covered in meters.
 * @param distancePerRoll The length of cable on a single roll in meters.
 * @return The minimum number of cable rolls required or -1 if not enough cable is available.
 *
 * Example:
 * calculateCableLength(100, 50)
 * Output: 2
 *
 * Note:
 * If the total distance is 100 meters and each roll contains 50 meters of cable,
 * then the function should return 2 as 2 rolls will be required to cover the distance.
 */
fun calculateCableLength(totalDistance: Int, distancePerRoll: Int): Int {

    if (totalDistance % distancePerRoll != 0) {
        return -1
    }
    
    return totalDistance / distancePerRoll
}