79822843

Date: 2025-11-17 22:42:09
Score: 0.5
Natty:
Report link

I would make it simple(ish). This returns [1] for row 0 and [1, 1] for row 1. See Wikipedia

def pascal(n): 
  row = [1]
  for c in range(1,n+1): 
     row += [row[-1]*(n-c+1)//c]
  return row
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Andy Richter