5 lines java code


#1

int z[]=new int[A+1];
z[0]=1;
for(int i=1;i<A+1;i++)
z[i]=z[i-1]*(A-i+1)/i;
return z;