• + 0 comments

    one line python ;

    def countApplesAndOranges(s, t, a, b, apples, oranges):
        print(len([i for i in apples if (i + a) <= t and (i + a) >= s]),len([i for i in oranges if (i + b) <= t and (i+b) >= s]), sep = '\n')