<jupyter_start><jupyter_text>006. Apple and Orange![이미지](https://www.dropbox.com/s/8f76k059jkugjio/%EC%8A%A4%ED%81%AC%EB%A6%B0%EC%83%B7%202018-06-20%2020.21.06.png?raw=1) ![이미지2](https://www.dropbox.com/s/ltk3ukrv45racvj/%EC%8A%A4%ED%81%AC%EB%A6%B0%EC%83%B7%202018-06-20%2020.21.43.png?raw=1)<jupyter_code>def countApplesAndOranges(s, t, a, b, apples, oranges):
    '''
    (s, t) => 집
    a = 사과
    b = 오렌지
    apples = 사과가 떨어진 상대 좌표
    oranges = 오렌지가 떨어진 상대 좌표
    '''
    
    apples_count = sum([1 for x in apples if (x + a) >= s and (x + a) <= t])
    oranges_count = sum([1 for x in oranges if (x + b) >= s and (x + b) <= t])
    return apples_count, oranges_count
   
assert(countApplesAndOranges(7, 11, 5, 15, [-2, 2, 1], [5, -6]) == (1, 1))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1997439180537772, 'fraction_numerical': 0.10755441741357234, 'mean_word_length': 3.768292682926829, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 8, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '581598', 'license': 'MIT', 'n_tokens_mistral': 448, 'n_tokens_neox': 421, 'n_words': 70, 'path': 'HackerRank/algorithms/warmup/006.Apple-and-Orange.ipynb', 'repo_name': 'zzsza/Algorithm-Training', 'size': '781'}