Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

7
  • \$\begingroup\$ In the list of answers to Generate Pascal's triangle you may find additional ideas. \$\endgroup\$ Commented Mar 20, 2013 at 13:51
  • \$\begingroup\$ The shortest solution I know of is 68 bytes, which would have scored a 8.3. But apparently a 63 byte solution exists. \$\endgroup\$ Commented Mar 20, 2013 at 13:51
  • \$\begingroup\$ There's a 63-byte Python solution in the duplicate thread, but that's taking input from stdin, so hard-coding 31 would save 5 for a score of 8.55. \$\endgroup\$ Commented Mar 20, 2013 at 13:53
  • \$\begingroup\$ @PeterTaylor The only problem with that solution, is that you'd need to replace print x with print' '.join(map(str,x)) for a loss of 18 bytes. \$\endgroup\$ Commented Mar 20, 2013 at 13:57
  • 3
    \$\begingroup\$ Interesting. I must have posted that before I registered. That could have been made a byte shorter, actually: a=[];exec"a=map(sum,zip(a,[0]+a))+[1];print a;"*input() \$\endgroup\$ Commented Mar 20, 2013 at 14:28