You are viewing a single comment's thread. Return to all comments →
Hi, I had a similar approach at first and optimized this way
results=[] for i in range(1,max(b)+1): if all(i%anum==0 for anum in a) and all(bnum%i==0 for bnum in b): results.append(i) return (len(results))
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 →
Hi, I had a similar approach at first and optimized this way