With Python and some math


#1

import math
class Solution:
# @param A : integer
# @return a list of integers
def getRow(self, A):
result = []
for i in range(0,A+1):
result.append(math.factorial(A)/(math.factorial(i)*math.factorial(A-i)))
return result