/**
 * Given a list of measurements and a target measurement, finds the absolute differences between each measurement and the target.
 *
 * @param measurements A list of integers representing the measurements taken.
 * @param targetMeasurement An integer representing the target measurement.
 * @return A list of integers representing the absolute differences between each measurement and the target.
 *
 * Example:
 * calculateMeasurementDifference(listOf(12, 15, 9, 10, 13), 11) -> [1, 4, 2, 1, 2]
 */
fun calculateMeasurementDifference(measurements: List<Int>, targetMeasurement: Int): List<Int> {

    val differences = mutableListOf<Int>()
    for (measurement in measurements) {
        differences.add(Math.abs(measurement - targetMeasurement))
    }
    return differences
}
/**
 * Given a list of measurements and a target measurement, finds the absolute differences between each measurement and the target.
 *
 * @param measurements A list of integers representing the measurements taken.
 * @param targetMeasurement An integer representing the target measurement.
 * @return A list of integers representing the absolute differences between each measurement and the target.
 *
 * Example:
 * calculateMeasurementDifference(listOf(12, 15, 9, 10, 13), 11) -> [1, 4, 2, 1, 2]
 */
fun calculateMeasurementDifference(measurements: List<Int>, targetMeasurement: Int): List<Int> {
/**
 * Given a list of measurements and a target measurement, finds the absolute differences between each measurement and the target.
 *
 * @param measurements A list of integers representing the measurements taken.
 * @param targetMeasurement An integer representing the target measurement.
 * @return A list of integers representing the absolute differences between each measurement and the target.
 *
 * Example:
 * calculateMeasurementDifference(listOf(12, 15, 9, 10, 13), 11) -> [1, 4, 2, 1, 2]
 */
fun calculateMeasurementDifference(measurements: List<Int>, targetMeasurement: Int): List<Int> {

    val differences = mutableListOf<Int>()
    for (measurement in measurements) {
        differences.add(Math.abs(measurement - targetMeasurement))
    }
    return differences
}