• + 0 comments

    python 3

    def countApplesAndOranges(s, t, a, b, apples, oranges):

    apples = sum(1 for d in apples if s <= a + d <= t)
    
    oranges = sum(1 for d in oranges if s <= b + d <= t)
    
    print(apples)
    print(oranges)