You are viewing a single comment's thread. Return to all comments →
def countApplesAndOranges(s, t, a, b, apples, oranges): app_count=0 org_count=0 n1=len(apples) n2=len(oranges) for i in range(n1): if ((s<= a+apples[i]) and (a+apples[i]<=t)): app_count=app_count+1 for j in range(n2): if ((s<= b+oranges[j]) and (b+oranges[j]<=t)): org_count=org_count+1 print(app_count) print(org_count)
Seems like cookies are disabled on this browser, please enable them to open this website
Apple and Orange
You are viewing a single comment's thread. Return to all comments →