示例#1
0
def solve():
    seq = range(9, 0, -1)
    seq = map(lambda n: math_ext.pandigital(range(1, n + 1)), seq)
    seq = map(sorted, seq)
    seq = map(reversed, seq)
    seq = itertools.chain.from_iterable(seq)
    return itertools_ext.find(math_ext.is_prime, seq)
示例#2
0
def solve():
    return itertools_ext.find(lambda n: not is_goldbach(n),
                              odd_composite_numbers())
示例#3
0
def solve():
    i, v = itertools_ext.find(lambda x: x[1] >= 10**(1000 - 1),
                              enumerate(math_ext.fibonacci()))
    return i + 1
示例#4
0
def solve():
    return itertools_ext.find(lambda x: len(math_ext.get_divisors(x)) >= 500,
                              math_ext.triangular())
示例#5
0
def test_find():
    assert itertools_ext.find(lambda x: x >= 10, itertools.count()) == 10