@LongsPeak Ok,I just wonder anyone use python?I just use python to solve it:

class Solution(object): def getRow(self, rowIndex): res=[[1]] for i in range(1,rowIndex+1): res+=[map(lambda x,y:x+y,res[-1]+[0],[0]+res[-1])] return res[rowIndex];Pascal's Triangle II