예제 #1
0
def run():
    t = euler_util.triangles()
    for i in range(285):
        t.next()

    p = euler_util.pentagonals()
    curr_p = p.next()

    h = euler_util.hexagonals()
    curr_h = h.next()

    while True:
        curr_t = t.next()

        while curr_p < curr_t:
            curr_p = p.next()

        while curr_h < curr_t:
            curr_h = h.next()

        if curr_t == curr_h and curr_t == curr_p:
            # print curr_t
            return
예제 #2
0
def run():
    fields = [Field(get_field(g)) for g in [eu.triangles(), eu.squares(), eu.pentagonals(), eu.hexagonals(), eu.heptagonals(), eu.octagonals()]]
    solve(fields, [0] * 6)