/**
 * Given a list of elements and a value, modify the elements in the list by increasing each element by the value if the
 * element is divisible by 3 or decreasing the element by the value if the element is divisible by 5.
 *
 * @param elements List of integers representing the elements to modify.
 * @param value The value to use for modification.
 * @return The modified list.
 *
 * Example:
 * modifyListElementsOrOperator(listOf(15, 6, 7, 10, 12), 4) returns [11, 10, 11, 14, 16]
 */
fun modifyListElementsOrOperator(elements: MutableList<Int>, value: Int): List<Int> {

    // Iterate over each element in the list
    for (i in elements.indices) {
        // Check if the element is divisible by 3 or divisible by 5
        if (elements[i] % 3 == 0 || elements[i] % 5 == 0) {
            // Increase or decrease the element based on the condition
            elements[i] += if (elements[i] % 3 == 0) value else -value
        }
    }
    return elements
}
/**
 * Given a list of elements and a value, modify the elements in the list by increasing each element by the value if the
 * element is divisible by 3 or decreasing the element by the value if the element is divisible by 5.
 *
 * @param elements List of integers representing the elements to modify.
 * @param value The value to use for modification.
 * @return The modified list.
 *
 * Example:
 * modifyListElementsOrOperator(listOf(15, 6, 7, 10, 12), 4) returns [11, 10, 11, 14, 16]
 */
fun modifyListElementsOrOperator(elements: MutableList<Int>, value: Int): List<Int> {
/**
 * Given a list of elements and a value, modify the elements in the list by increasing each element by the value if the
 * element is divisible by 3 or decreasing the element by the value if the element is divisible by 5.
 *
 * @param elements List of integers representing the elements to modify.
 * @param value The value to use for modification.
 * @return The modified list.
 *
 * Example:
 * modifyListElementsOrOperator(listOf(15, 6, 7, 10, 12), 4) returns [11, 10, 11, 14, 16]
 */
fun modifyListElementsOrOperator(elements: MutableList<Int>, value: Int): List<Int> {

    // Iterate over each element in the list
    for (i in elements.indices) {
        // Check if the element is divisible by 3 or divisible by 5
        if (elements[i] % 3 == 0 || elements[i] % 5 == 0) {
            // Increase or decrease the element based on the condition
            elements[i] += if (elements[i] % 3 == 0) value else -value
        }
    }
    return elements
}