Discuss / Python / 符合题意,但无法通过测试,请大神帮忙解读

符合题意,但无法通过测试,请大神帮忙解读

Topic source

路遥无马

#1 Created at ... [Delete] [Delete and Lock User]

    n = 0

    a = [1]

    while True:

        yield a

        a.append(1)

        b = a

        c = n         

        while c > 0:

            a[c] = b[c-1] + b[c]         

            c = c-1

        n = n+1


  • 1

Reply