<jupyter_start><jupyter_text>Problem 5: Smallest multiple2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?<jupyter_code>def is_perfect_factor(n, divisors):
    """
        Checks if n is divisible by all numbers in 
    """
    for d in divisors:
        if n%d != 0:
            return False
    return True

def get_smallest_perfect_divisor(divisors):
    """
        Returns the smallest number that is divisible
        by all of the integers in the list divisors
        
        Quite a slow method of calculating this: probably better to simply work out
        all unique prime factors in a the divisors
    """
    n = divisors[-1]
    while n > 1:
        if is_perfect_factor(n,divisors):
            return n
        n = n+1
    
assert get_smallest_perfect_divisor([i for i in xrange(1,11)]) == 2520, "Failed to pass basic sanity test"
print get_smallest_perfect_divisor([i for i in xrange(1,21)])<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.06307129798903108, 'fraction_numerical': 0.022851919561243144, 'mean_word_length': 2.9107142857142856, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '159350', 'license': 'MIT', 'n_tokens_mistral': 351, 'n_tokens_neox': 319, 'n_words': 133, 'path': '05/05.ipynb', 'repo_name': 'JacobRawling/ProjectEuler', 'size': '1094'}