Exemplo n.º 1
0
def test_simple_factorization():
    """Tests simple factorization method """

    assert simple_factorization(20) == [2, 2, 5]
    assert simple_factorization(201929) == [7, 7, 13, 317]
    assert simple_factorization(0) == []
    assert simple_factorization(1) == []
    assert simple_factorization(12) == [2, 2, 3]
    assert simple_factorization(17) == [17]
def problem_3():
    """ Attempt to solve the problem... """

    factors = simple_factorization(600851475143)
    return max(factors)