From: Dale Martenson Date: 2006-08-12T00:50:52+09:00 Subject: Re: Codegolf - Pascals Triangle On Friday, August 11, 2006, at 11:16 PM, Daniel Martin wrote: >Michael Ulm writes: > >> My take on the latest problem from http://www.codegolf.com >> >> a=[] >> 34.times{k=0;puts (a.map!{|i|k+k=i}<<1).join(" ")} >> >> >> 56 bytes. > >I think this may be very close to minimal - no approaches I tried got >this small. Note that you can slightly improve readability (but with >no change in character count) with: > >a=[] >34.times{k=0;a.map!{|i|k+k=i}<<1;puts a.join(" ")} > >Then there's removing the parentheses around the argument to join, but >that generates a warning that probably means you fail their test. > How about: a=[] 34.times{k=0;puts (a.map!{|i|k+k=i}<<1)*' '} -- Posted with http://DevLists.com. Sign up and save your mailbox.