/**
 * This function finds the intersection of two lists by checking if the modulus of each element in the first list
 * with the range of the second list is equal to zero.
 *
 * @param numbers1 A list of numbers.
 * @param numbers2 A list of numbers.
 * @return A list containing the common elements found in both lists.
 */
fun intersectionModulusRange(numbers1: List<Int>, numbers2: List<Int>): List<Int> {

    val intersection = mutableListOf<Int>()

    for (num1 in numbers1) {
        for (num2 in numbers2) {
            if (num2 != 0 && num1 % num2 == 0) {
                if (num1 !in intersection) {
                    intersection.add(num1)
                }
            }
        }
    }

    return intersection
}
/**
 * This function finds the intersection of two lists by checking if the modulus of each element in the first list
 * with the range of the second list is equal to zero.
 *
 * @param numbers1 A list of numbers.
 * @param numbers2 A list of numbers.
 * @return A list containing the common elements found in both lists.
 */
fun intersectionModulusRange(numbers1: List<Int>, numbers2: List<Int>): List<Int> {
/**
 * This function finds the intersection of two lists by checking if the modulus of each element in the first list
 * with the range of the second list is equal to zero.
 *
 * @param numbers1 A list of numbers.
 * @param numbers2 A list of numbers.
 * @return A list containing the common elements found in both lists.
 */
fun intersectionModulusRange(numbers1: List<Int>, numbers2: List<Int>): List<Int> {

    val intersection = mutableListOf<Int>()

    for (num1 in numbers1) {
        for (num2 in numbers2) {
            if (num2 != 0 && num1 % num2 == 0) {
                if (num1 !in intersection) {
                    intersection.add(num1)
                }
            }
        }
    }

    return intersection
}