fork(1) download
  1. L=[1,2,3,4,5,6,7,8]
  2. E=[1]+[0]*~-len(L)
  3. F=[]
  4. I=[]
  5.  
  6. i=f=1
  7. while len(F)<len(L):
  8. F.append(f)
  9. f *= i
  10. i += 1
  11.  
  12. for i in range(len(L)):
  13. c = E[i]//L[0]
  14. I.append(c)
  15. for j in range(len(L)-i):
  16. E[i+j] -= c*L[j]*F[i+j]//F[j]//F[i]
  17.  
  18. print(I)
Success #stdin #stdout 0.02s 9936KB
stdin
Standard input is empty
stdout
[1, -2, 5, -16, 65, -326, 1957, -13700]