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.
python3defdivisor(n):div=[]foriinrange(1,n+1):ifi==1ori==n:div.append(i)else:ifn%i==0:div.append(i)returndivdefrestaurant(l,b):# Write your code heredivl=divisor(l)divb=divisor(b)common=[]foriindivl:ifiindivb:common.append(i)maximum=max(common)total=int((l/maximum)*(b/maximum))returntotal
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Restaurant
You are viewing a single comment's thread. Return to all comments →