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.
python
a_count = 0
b_count = 0
for apple in apples:
apple += a
if apple <= t and apple >= s:
a_count += 1
for orange in oranges:
orange += b
if orange <= t and orange >= s:
b_count += 1
print(f"{a_count} \n{b_count}")
Cookie support is required to access HackerRank
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 →
python a_count = 0 b_count = 0 for apple in apples: apple += a if apple <= t and apple >= s: a_count += 1 for orange in oranges: orange += b if orange <= t and orange >= s: b_count += 1 print(f"{a_count} \n{b_count}")