/**
 * Given a list of numbers and a target number x, returns the index of the first occurrence
 * of a number that is not equal to x. If all numbers in the list are equal to x, returns -1.
 *
 * @param numbers A list of numbers.
 * @param x The target number.
 * @return The index of the first occurrence of a number that is not equal to x, or -1 if all
 *         numbers are equal to x.
 */
fun notEqualLoop(numbers: List<Int>, x: Int): Int {

    for ((index, num) in numbers.withIndex()) {
        if (num != x) {
            return index
        }
    }
    return -1
}
/**
 * Given a list of numbers and a target number x, returns the index of the first occurrence
 * of a number that is not equal to x. If all numbers in the list are equal to x, returns -1.
 *
 * @param numbers A list of numbers.
 * @param x The target number.
 * @return The index of the first occurrence of a number that is not equal to x, or -1 if all
 *         numbers are equal to x.
 */
fun notEqualLoop(numbers: List<Int>, x: Int): Int {
/**
 * Given a list of numbers and a target number x, returns the index of the first occurrence
 * of a number that is not equal to x. If all numbers in the list are equal to x, returns -1.
 *
 * @param numbers A list of numbers.
 * @param x The target number.
 * @return The index of the first occurrence of a number that is not equal to x, or -1 if all
 *         numbers are equal to x.
 */
fun notEqualLoop(numbers: List<Int>, x: Int): Int {

    for ((index, num) in numbers.withIndex()) {
        if (num != x) {
            return index
        }
    }
    return -1
}