identity matrix

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

Print N x N identity matrix.

Options

exec is denied

no deadline, the server will not save your submission

Sample input:_

3

Sample output:

1 0 0
0 1 0
0 0 1

Sample input:_

7

Sample output:

1 0 0 0 0 0 0
0 1 0 0 0 0 0
0 0 1 0 0 0 0
0 0 0 1 0 0 0
0 0 0 0 1 0 0
0 0 0 0 0 1 0
0 0 0 0 0 0 1

Sample input:_

20

Sample output:

1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1leonid440.03502013/03/04 09:36:220B / 18B / 25B
2clock440.03972013/03/04 10:02:100B / 18B / 25B
3Histocrat440.05072016/01/29 08:38:330B / 18B / 25B

Ruby2 _

RankUserSizeTimeDateStatistics
1Histocrat430.20612016/10/12 05:08:140B / 18B / 24B

Perl _

RankUserSizeTimeDateStatistics
1tails300.03252013/07/14 00:45:160B / 13B / 16B
2teebee300.03302013/12/23 15:47:410B / 13B / 16B
3llhuii300.04192015/09/19 00:58:290B / 12B / 17B
4ninjalj500.04502012/11/05 20:42:260B / 19B / 31B
5BioFALSE580.03922014/01/02 07:12:220B / 23B / 35B
6MG620.03862012/11/20 09:06:300B / 27B / 34B

Python _

RankUserSizeTimeDateStatistics
1xsot490.10572015/08/17 15:36:030B / 25B / 23B
2llhuii500.08362015/08/23 11:07:050B / 26B / 20B
3clock520.07912012/11/15 14:28:350B / 26B / 22B
4leonid520.06502012/12/27 07:05:110B / 24B / 27B
5xnor520.08672015/06/14 13:44:170B / ?B / ?B
6hallvabo530.04952012/11/02 22:36:240B / 25B / 26B
7twobit530.11222012/11/14 06:54:500B / 25B / 25B
8starmie530.08402015/04/26 16:16:250B / 25B / 26B
9recursive550.07482012/11/17 00:53:160B / 27B / 23B
10rolf570.05662012/12/17 21:19:280B / ?B / ?B
11govind570.08632013/05/11 03:37:391B / ?B / ?B
12Matthew Wilkes640.05712012/12/28 07:24:380B / 40B / 12B
13malkovich850.38672013/09/01 23:13:430B / 44B / 32B
14phaed1150.09742012/11/19 08:27:280B / ?B / ?B

Python3 _

RankUserSizeTimeDateStatistics
1mitchs (luck)490.18012016/02/11 01:43:480B / 25B / 22B
2xsot (luck)500.19572016/02/14 19:15:350B / 24B / 24B
3xsot530.16342016/02/11 12:08:300B / 28B / 23B
4mitchs550.18082016/02/10 20:12:040B / 29B / 25B

Scheme _

RankUserSizeTimeDateStatistics
1kaki800.06252013/03/25 05:08:560B / 30B / 44B

Common LISP _

RankUserSizeTimeDateStatistics
1ttmh840.10162015/07/03 07:57:530B / 48B / 30B
2pgf2870.12272013/04/13 03:43:030B / 43B / 35B

Io _

RankUserSizeTimeDateStatistics
1teebee770.25822013/09/09 00:14:180B / 42B / 32B
2pooq980.26302012/11/04 22:50:210B / 62B / 32B

JavaScript _

RankUserSizeTimeDateStatistics
1nn590.05212012/11/04 22:40:410B / 26B / 32B
2clock590.06682012/11/08 18:03:280B / 29B / 29B
3Shmiddty590.06272013/04/23 06:13:580B / 26B / 32B
4copy600.05992013/04/23 05:15:200B / 27B / 32B

Lua _

RankUserSizeTimeDateStatistics
1clock700.04662012/11/10 08:02:150B / 36B / 28B
2twobit700.03832012/11/10 09:41:400B / 36B / 28B
3AndoDaan930.03332014/08/15 19:22:470B / 52B / 36B

Xtal _

RankUserSizeTimeDateStatistics
1clock680.04502013/09/29 00:18:190B / 38B / 29B
2teebee680.05242015/02/08 00:24:050B / 38B / 29B
3pooq750.07022012/12/03 05:30:460B / 41B / 32B

SNOBOL _

RankUserSizeTimeDateStatistics
1clock650.04412013/02/04 10:33:150B / 31B / 16B

REXX _

RankUserSizeTimeDateStatistics
1clock580.03402012/11/14 15:57:540B / 35B / 12B
2teebee580.04132012/11/16 10:12:190B / 35B / 12B
3*yuko*580.04112014/03/19 23:03:290B / 35B / 17B

PARI/GP _

RankUserSizeTimeDateStatistics
1teebee540.08142012/11/03 05:07:400B / 32B / 22B
2clock540.03972013/02/02 16:04:090B / 32B / 22B
3mitchs540.05322016/01/30 05:47:230B / 32B / 22B

Cyan _

RankUserSizeTimeDateStatistics
1teebee814.42052013/03/03 06:53:340B / 42B / 36B
2clock814.25522013/03/03 14:35:250B / 42B / 36B

Smalltalk _

RankUserSizeTimeDateStatistics
1clock850.15812013/01/08 18:17:190B / 44B / 37B

BASIC _

RankUserSizeTimeDateStatistics
1pooq470.04092012/11/04 23:15:300B / 32B / 8B
2teebee470.01382012/11/06 05:09:000B / 32B / 11B
3clock470.03152013/03/27 21:33:280B / 32B / 9B

J _

RankUserSizeTimeDateStatistics
1I., S.150.06852012/11/04 06:52:530B / 8B / 7B
2clock150.07122013/04/07 14:52:370B / 6B / 9B
3Hendrik150.06372014/01/31 19:39:230B / 6B / 9B

K _

RankUserSizeTimeDateStatistics
1teebee180.02812013/02/25 10:08:350B / 5B / 13B
2twobit190.04482012/11/05 00:38:440B / 5B / 14B

C _

RankUserSizeTimeDateStatistics
1nu(rand)640.01102014/12/07 09:38:140B / 33B / 31B
2xsot(rand)650.00072015/10/17 23:01:330B / 29B / 35B
3llhuii(rand)670.01402014/12/06 13:31:420B / 31B / 35B
4nn710.03472012/11/04 15:00:460B / 33B / 37B
5ush710.04232012/11/05 09:53:290B / 33B / 37B
6nu710.03342012/11/09 01:53:020B / 33B / 37B
7xsot710.03182015/10/17 12:05:300B / 33B / 37B
8inaniwa720.03182012/11/05 09:54:160B / 36B / 36B
9fill720.03722012/11/07 18:12:370B / 36B / 36B
10david_werecat720.03172012/12/07 04:20:570B / 36B / 36B
11eiyuu720.03912012/12/15 09:08:060B / 36B / 36B
12llhuii730.03202014/12/02 23:46:270B / 34B / 38B
13%20740.03212014/11/12 02:57:260B / 36B / 38B
14lpha750.03202014/03/09 16:19:320B / 38B / 37B
15twobit770.01412012/11/25 04:27:280B / 41B / 36B
16amat820.04242012/11/04 17:24:570B / 44B / 38B
17pap820.03212013/10/23 06:55:140B / 41B / 41B

Haskell _

RankUserSizeTimeDateStatistics
1int-e700.04192015/01/01 20:02:240B / 35B / 33B
2henkma700.03962015/01/31 11:14:140B / 35B / 31B
3cojna710.07382014/12/11 03:04:550B / 37B / 31B
4tttaki770.04132012/11/03 08:35:170B / 48B / 27B
5nooodl820.03432013/09/09 01:47:060B / ?B / ?B
6sa1130.05192012/12/15 09:18:070B / ?B / ?B

ObjC _

RankUserSizeTimeDateStatistics
1%20740.03192014/11/12 02:57:380B / 36B / 38B

Java _

RankUserSizeTimeDateStatistics
1teebee1030.23122016/03/03 00:15:180B / 54B / 45B
2dc1240.20302016/03/02 19:33:230B / 67B / 53B
3teebee(nocheat)1240.26342016/03/02 20:33:390B / 70B / 49B
4Klemmbrett(cheat)1250.20992016/03/02 19:30:550B / ?B / ?B
5dc(nocheat)1260.32482016/03/02 19:29:280B / 71B / 50B
6Klemmbrett1270.26422016/03/02 19:25:230B / ?B / ?B

Pascal _

RankUserSizeTimeDateStatistics
1uru980.01942012/11/17 19:08:590B / 60B / 26B

Fortran _

RankUserSizeTimeDateStatistics
1*yuko*600.04842012/11/04 22:57:330B / 34B / 24B

Chapel _

RankUserSizeTimeDateStatistics
1clock530.03962013/10/13 00:23:130B / 30B / 18B

Maxima _

RankUserSizeTimeDateStatistics
1pooq431.15472012/11/05 18:01:380B / 17B / 24B
2teebee430.44582013/12/23 18:44:030B / 17B / 24B

Octave _

RankUserSizeTimeDateStatistics
1pooq341.21082012/11/05 23:18:010B / 21B / 12B
2teebee340.73322012/11/06 05:00:540B / 21B / 12B
3Hendrik340.68812016/06/16 22:51:000B / 22B / 12B

AWK _

RankUserSizeTimeDateStatistics
1llhuii410.03812015/08/20 01:22:160B / ?B / ?B
2teebee430.03352012/11/04 22:57:510B / 20B / 23B
3nn430.03312012/11/09 01:48:490B / 20B / 23B
4clock450.03372012/11/04 17:23:580B / 20B / 25B
5ninjalj490.03642012/11/05 21:19:180B / 22B / 27B

sed _

RankUserSizeTimeDateStatistics
1tails560.03412013/07/12 00:53:470B / 26B / 17B
2%20560.03722016/08/20 19:34:150B / 25B / 19B

jq _

RankUserSizeTimeDateStatistics
1teebee460.04112015/02/11 08:02:580B / 21B / 23B
2clock470.03282015/02/11 04:40:470B / 22B / 25B

Bash (builtins) _

RankUserSizeTimeDateStatistics
1tails580.12682016/10/13 16:18:530B / 26B / 25B

make _

RankUserSizeTimeDateStatistics
1tails1040.04642016/01/29 12:10:050B / 52B / 41B

wake _

RankUserSizeTimeDateStatistics
1tails740.04992013/09/09 01:51:350B / 20B / 44B

bc _

RankUserSizeTimeDateStatistics
1teebee520.03862012/11/03 05:21:510B / 24B / 26B
2nn550.02312012/12/26 22:41:180B / 25B / 27B
3ninjalj560.03452012/11/06 02:06:180B / 25B / 26B

dc _

RankUserSizeTimeDateStatistics
1int-e380.04152014/12/10 05:39:190B / 26B / 12B
2tails380.05022015/08/19 17:51:530B / 26B / 12B

xgawk _

RankUserSizeTimeDateStatistics
1llhuii400.03892015/08/20 01:23:160B / 21B / 19B
2teebee430.03252012/11/06 01:49:040B / 20B / 23B
3ninjalj460.06102012/11/05 21:16:070B / 22B / 24B

R _

RankUserSizeTimeDateStatistics
1clock330.41292012/11/03 03:35:200B / 21B / 12B
2teebee330.41672012/11/03 04:05:250B / 21B / 12B
3ludo330.39812016/06/14 01:21:410B / 21B / 12B

QCL _

RankUserSizeTimeDateStatistics
1teebee990.08272012/12/20 07:34:200B / 59B / 30B
2clock1010.05682012/12/20 06:43:130B / 59B / 30B

Brainfuck _

RankUserSizeTimeDateStatistics
1mitchs (cheat)810.08702015/10/05 02:10:480B / 2B / 77B
2mitchs1090.03192014/04/12 01:27:240B / 0B / 109B
3koropicot1600.03212012/12/05 17:49:500B / 0B / 160B

Whitespace _

RankUserSizeTimeDateStatistics
1kaz_u1410.04902015/05/21 23:08:070B / 0B / 0B
2mitchs1450.05252015/03/27 10:36:130B / 0B / 0B
3%201480.06752015/03/30 11:18:140B / 0B / 0B

GolfScript _

RankUserSizeTimeDateStatistics
1tails180.07172012/11/05 21:49:420B / 1B / 16B
2%20210.06692015/05/22 18:25:560B / 5B / 15B

gs2 _

RankUserSizeTimeDateStatistics
1mitchs110.26952015/04/28 16:36:096B / 2B / 2B

FlogScript _

RankUserSizeTimeDateStatistics
1milieu170.11522012/11/16 22:36:080B / ?B / ?B

Burlesque _

RankUserSizeTimeDateStatistics
1clock190.07412013/05/02 16:55:340B / 10B / 9B
2mroman240.05692014/03/09 07:38:140B / ?B / ?B

FerNANDo _

RankUserSizeTimeDateStatistics
13870.17202016/10/15 01:49:160B / ?B / ?B

z80 _

RankUserSizeTimeDateStatistics
1*yuko*320.48832012/11/05 00:45:2216B / 6B / 6B

Vim _

RankUserSizeTimeDateStatistics
1clock260.04032012/11/04 17:43:032B / 15B / 8B
2nn290.06082012/11/03 19:32:252B / 14B / 11B
3pla290.04302012/11/03 23:24:541B / 22B / 6B

Groovy _

RankUserSizeTimeDateStatistics
1clock563.54692013/03/04 09:01:070B / 34B / 19B
2teebee562.92942013/03/18 00:32:400B / 34B / 20B
3nn673.15342012/11/04 23:03:370B / 38B / 26B

Logo _

RankUserSizeTimeDateStatistics
1clock520.04862013/03/09 13:33:090B / 30B / 14B
2teebee520.05082013/03/18 03:18:490B / 31B / 12B

Language Ranking_

RankLangUserSizeScore
1gs2mitchs1110000
2JI., S.157333
3FlogScriptmilieu176470
4GolfScripttails186111
5Kteebee186111
6Burlesqueclock195789
7Vimclock264230
8Perltails303666
9z80*yuko*323437
10Rclock333333
11Octavepooq343235
12dcint-e382894
13xgawkllhuii402750
14AWKllhuii412682
15Maximapooq432558
16Ruby2Histocrat432558
17Rubyleonid442500
18jqteebee462391
19BASICpooq472340
20Pythonxsot492244
21Python3mitchs (luck)492244
22bcteebee522115
23Logoclock522115
24Chapelclock532075
25PARI/GPteebee542037
26Groovyclock561964
27sedtails561964
28REXXclock581896
29Bash (builtins)tails581896
30JavaScriptnn591864
31Fortran*yuko*601833
32Cnu(rand)641718
33SNOBOLclock651692
34Xtalclock681617
35Luaclock701571
36Haskellint-e701571
37waketails741486
38ObjC%20741486
39Ioteebee771428
40Schemekaki801375
41Cyanteebee811358
42Brainfuckmitchs (cheat)811358
43Common LISPttmh841309
44Smalltalkclock851294
45Pascaluru981122
46QCLteebee991111
47Javateebee1031067
48maketails1041057
49Whitespacekaz_u141780
50FerNANDo387284

return top