You are viewing a single comment's thread. Return to all comments →
input(); a=list(map(int, input().split())) b=list(map(int, input().split())) ans=0 for i in range(1, 101): if all(i%x==0 for x in a) and all(x%i==0 for x in b): ans+=1 print(ans)
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 →