Hi all,
For those who found the 1,000 Digits of Pi problem too daunting, here’s
something a little simpler for you. The new Code Golf[1] challenge
involves you having to create a number spiral such as :
1 2 3
10 11 4
9 12 5
8 7 6
and
1 2 3 4 5
18 19 20 21 6
17 28 29 22 7
16 27 30 23 8
15 26 25 24 9
14 13 12 11 10
Seems pretty simple, huh? The URL to the full challenge description is
http://codegolf.com/oblongular-number-spirals
I found it more difficult than I first thought it would be, but the code
was a lot of fun to write. At the time of writing the best Ruby entry
is 169 bytes. Can you beat it?
Regards,
Carl.
[1] http://codegolf.com/ - “allows you to show off your code-fu by
trying to solve coding problems using the least number of keystrokes.”