You are viewing a single comment's thread. Return to all comments →
Python
def getTotalX(a, b): count = 0 def is_factor(arr,x): for i in arr: if x % i != 0: return 0 return 1 def is_multiple(arr,x): for i in arr: if i % x != 0: return 0 return 1 for i in range(max(a),min(b)+1): if is_factor(a, i) and is_multiple(b, i): count+=1 return count
Seems like cookies are disabled on this browser, please enable them to open this website
Between Two Sets
You are viewing a single comment's thread. Return to all comments →
Python