解答:
class Solution:
def getRow(self, rowIndex: int) -> List[int]:
l1 = [1]
l2 = []
n = 33
while n >= 0:
l2.append(l1)
l1 = [sum(t) for t in zip([0]+l1, l1+[0])]
n -= 1
return l2[rowIndex]
版权声明:本文为qq_41929011原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。