• + 0 comments

    def getTotalX(a, b): numbers_between = [] condition_1_flag = 0 condition_2_flag = False main_list = a+b max = max(main_list)

        for i in range(1,max+1):
                condition_1_flag = 0
                condition_2_flag = 0
                for item in a:
                        if i%item == 0:
                                condition_1_flag+=1
                        if condition_1_flag == len(a):
                                numbers_between.append(i)
                for item in b:
                        if item%i == 0:
                                condition_2_flag+=1
                        if condition_2_flag == len(b):
                                numbers_between.append(i)
    
    
        numbers_between.sort()
    

    def find_repeated_numbers(arr): count_dict = {} repeated_numbers = []

    # Count occurrences of each number
    for num in arr:
        if num in count_dict:
            count_dict[num] += 1
        else:
            count_dict[num] = 1
    
    # Find numbers that are repeated
    for num, count in count_dict.items():
        if count > 1:
            repeated_numbers.append(num)
    
    return len(repeated_numbers)