From: Noah Easterly Date: 2006-09-30T03:50:10+09:00 Subject: Re: Code Golf Challenge : Oblongular Number Spirals non-recursive 170 bytes: (around and around and around we go) $/=' ' b,a=$<.map{|a|a.to_i} r=Array.new(a){[]} c="#{a*b}".size x=k=-1 i=y=j=0 a.times{r[y+=k][x+=j]="#{i+=1}".rjust c}while(a,b,j,k=b,a-1,-k,j;a>0) r.each{|o|puts o*$/} Paul Robinson wrote: > On 29 Sep 2006, at 17:57, Simon Kr�ger wrote: > > > Oblongular Number Spirals: > > > > well, recursion and rotation are the keys > > Yup, my solution has the recursion but is bulked by iterating and > using a case statement. > > > I think the whole point of codegolf.com would > > vanish if you paste code of one of the top tens > > for each problem. > > Well, I'm happy to put my solutions out there into the wild for > people to prod with. It's only a little game after all. Now, if there > were prizes on offer... > > > Perhaps they should open the code for all > > challenges older than 8 weeks or so - but than > > they have to freeze the scores at this point. > > I like the fact that I can go back and compete in older challenges if > I want. I really like it as it is. > > Perhaps somebody could set up an OpenCodeGolf.com where that happens > for people who want a different way to play, with different > challenges (so as not to spoil the ones on codegolf.com).