We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
defgetTotalX(a,b):m=len(a)n=len(b)f_list=[]#try all numbers up to min(b) and add those that divide elements of b to the f_list foriinrange(1,min(b)+1):forjinrange(n):flag=1ifb[j]%i!=0:flag=0breakifflagandi>=min(a):f_list.append(i)#remove those that are not divisible by elements of a foriintuple(f_list):forjinrange(m):ifi%a[j]!=0:f_list.remove(i)breakreturnlen(f_list)
Between Two Sets
You are viewing a single comment's thread. Return to all comments →