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):# First LCM of alcm=[]x=1whilex<=min(b):foryina:ifx%y!=0:x+=1breakelse:lcm.append(x)x+=1#HCF of bhcf=1forxinrange(1,min(b)+1):foryinb:ify%x!=0:breakelse:hcf=x# Final checkcount=len(lcm)forxinlcm:ifhcf%x!=0:count-=1returncount
Between Two Sets
You are viewing a single comment's thread. Return to all comments →
In PYTHON based on your logic
long but really basic