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]))

 

'# 코딩 문제 관련 > 파이썬' 카테고리의 다른 글

[HackerRank-python] Between Two Sets  (0) 2022.07.02
[HackerRank-python] Number Line Jumps  (0) 2022.07.01
[HackerRank-python] Grading Students  (0) 2022.06.29
백준 7569번(python)  (0) 2020.08.02
백준 7576번(python)  (0) 2020.08.02