spiral

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

Out a 2D array of numbers in a clockwise spiral.

03 13 23 33
02 12 22 32
01 11 21 31
00 10 20 30

03 13 23 33 32 31 30 20 10 00 01 02 12 22 21 11

Options

exec is denied

now post-mortem time, all source codes will be revealed

Sample input:_

1

Sample output:

00

Sample input:_

3

Sample output:

02 12 22 21 20 10 00 01 11

Sample input:_

6

Sample output:

05 15 25 35 45 55 54 53 52 51 50 40 30 20 10 00 01 02 03 04 14 24 34 44 43 42 41 31 21 11 12 13 23 33 32 22

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1yvl840.02772011/01/30 14:46:310B / 42B / 38B
2grimjim1160.02482011/01/26 08:14:560B / ?B / ?B

Perl _

RankUserSizeTimeDateStatistics
1tybalt89720.00382011/01/31 09:21:100B / ?B / ?B

Python _

RankUserSizeTimeDateStatistics
1recursive860.08292011/01/26 07:57:510B / 45B / 37B

JavaScript _

RankUserSizeTimeDateStatistics
1nn1260.00402011/01/30 01:05:160B / 58B / 64B

BASIC _

RankUserSizeTimeDateStatistics
1pooq1740.00242011/01/26 17:43:480B / 110B / 14B

J _

RankUserSizeTimeDateStatistics
1I., S.500.10482011/01/26 12:28:190B / 12B / 38B
2pooq840.10802011/01/26 15:10:450B / 32B / 43B
3I., S.460.43672011/02/13 06:39:590B / 11B / 34B

C _

RankUserSizeTimeDateStatistics
1nn1400.00172011/01/30 01:12:270B / 64B / 75B

OCaml _

RankUserSizeTimeDateStatistics
1m.ukai1740.09652011/01/26 17:31:020B / 111B / 20B

Fortran _

RankUserSizeTimeDateStatistics
1*yuko*970.00202011/01/29 23:48:450B / 54B / 40B

goruby _

RankUserSizeTimeDateStatistics
1grimjim890.15542011/01/27 13:42:500B / ?B / ?B

Groovy _

RankUserSizeTimeDateStatistics
1nn1376.47002011/01/31 23:15:440B / 68B / 63B

Language Ranking_

RankLangUserSizeScore
1JI., S.4610000
2Perltybalt89726388
3Rubyyvl845476
4Pythonrecursive865348
5gorubygrimjim895168
6Fortran*yuko*974742
7JavaScriptnn1263650
8Groovynn1373357
9Cnn1403285
10OCamlm.ukai1742643
11BASICpooq1742643

return to the top page