/**
 * This function takes a list of numbers and a divisor as input. It iterates through the list and
 * divides each number by the divisor. It then creates two new lists - one with all the numbers
 * that are divisible by the divisor and the other with all the numbers that are not divisible by
 * the divisor. The function returns the two lists as a Pair.
 *
 * @param numbers A list of numbers.
 * @param divisor The divisor.
 * @return A Pair containing two lists - the first with numbers divisible by the divisor and the
 * second with numbers not divisible by the divisor.
 *
 * Example:
 * numbers = listOf(10, 20, 30, 40, 50)
 * divisor = 3
 * intersectionDivisionAssignment(numbers, divisor) -> ([30], [10, 20, 40, 50])
 */
fun intersectionDivisionAssignment(numbers: List<Int>, divisor: Int): Pair<List<Int>, List<Int>> {

    val divisible = mutableListOf<Int>()
    val notDivisible = mutableListOf<Int>()

    for (num in numbers) {
        if (num % divisor == 0) {
            divisible.add(num)
        } else {
            notDivisible.add(num)
        }
    }

    return Pair(divisible, notDivisible)
}
/**
 * This function takes a list of numbers and a divisor as input. It iterates through the list and
 * divides each number by the divisor. It then creates two new lists - one with all the numbers
 * that are divisible by the divisor and the other with all the numbers that are not divisible by
 * the divisor. The function returns the two lists as a Pair.
 *
 * @param numbers A list of numbers.
 * @param divisor The divisor.
 * @return A Pair containing two lists - the first with numbers divisible by the divisor and the
 * second with numbers not divisible by the divisor.
 *
 * Example:
 * numbers = listOf(10, 20, 30, 40, 50)
 * divisor = 3
 * intersectionDivisionAssignment(numbers, divisor) -> ([30], [10, 20, 40, 50])
 */
fun intersectionDivisionAssignment(numbers: List<Int>, divisor: Int): Pair<List<Int>, List<Int>> {
/**
 * This function takes a list of numbers and a divisor as input. It iterates through the list and
 * divides each number by the divisor. It then creates two new lists - one with all the numbers
 * that are divisible by the divisor and the other with all the numbers that are not divisible by
 * the divisor. The function returns the two lists as a Pair.
 *
 * @param numbers A list of numbers.
 * @param divisor The divisor.
 * @return A Pair containing two lists - the first with numbers divisible by the divisor and the
 * second with numbers not divisible by the divisor.
 *
 * Example:
 * numbers = listOf(10, 20, 30, 40, 50)
 * divisor = 3
 * intersectionDivisionAssignment(numbers, divisor) -> ([30], [10, 20, 40, 50])
 */
fun intersectionDivisionAssignment(numbers: List<Int>, divisor: Int): Pair<List<Int>, List<Int>> {

    val divisible = mutableListOf<Int>()
    val notDivisible = mutableListOf<Int>()

    for (num in numbers) {
        if (num % divisor == 0) {
            divisible.add(num)
        } else {
            notDivisible.add(num)
        }
    }

    return Pair(divisible, notDivisible)
}