# 코딩 문제 관련/파이썬
[HackerRank-python] Apple and Orange
Hwiyong Jo
2022. 6. 29. 22:33
def countApplesAndOranges(s, t, a, b, apples, oranges):
# Write your code here
print(sum([1 if ((apple + a) >= s and (apple + a) <= t) else 0 for apple in apples]))
print(sum([1 if ((orange + b) >= s and (orange + b) <= t) else 0 for orange in oranges]))