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):# Write your code hereans=0max_num=max(a)min_num=min(b)foriinrange(max_num,min_num+1):count1=0count2=0forjina:ifi%j==0:count1+=1forkinb:ifk%i==0:count2+=1if(count1==len(a))and(count2==len(b)):ans+=1returnans
Cookie support is required to access HackerRank
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 →