Ladder operator

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 square of elements of raising operator matrix of augular momentum J.
The size of the matrix is 2J+1 and the (i,i+1) element is i*(2J+1-i).

Options

exec is denied

rejudge feature is enabled

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

Sample input:_

0
1
2
3
4
5

Sample output:

0
0 2 0
0 0 2
0 0 0
0 4 0 0 0
0 0 6 0 0
0 0 0 6 0
0 0 0 0 4
0 0 0 0 0
0 6 0 0 0 0 0
0 0 10 0 0 0 0
0 0 0 12 0 0 0
0 0 0 0 12 0 0
0 0 0 0 0 10 0
0 0 0 0 0 0 6
0 0 0 0 0 0 0
0 8 0 0 0 0 0 0 0
0 0 14 0 0 0 0 0 0
0 0 0 18 0 0 0 0 0
0 0 0 0 20 0 0 0 0
0 0 0 0 0 20 0 0 0
0 0 0 0 0 0 18 0 0
0 0 0 0 0 0 0 14 0
0 0 0 0 0 0 0 0 8
0 0 0 0 0 0 0 0 0
0 10 0 0 0 0 0 0 0 0 0
0 0 18 0 0 0 0 0 0 0 0
0 0 0 24 0 0 0 0 0 0 0
0 0 0 0 28 0 0 0 0 0 0
0 0 0 0 0 30 0 0 0 0 0
0 0 0 0 0 0 30 0 0 0 0
0 0 0 0 0 0 0 28 0 0 0
0 0 0 0 0 0 0 0 24 0 0
0 0 0 0 0 0 0 0 0 18 0
0 0 0 0 0 0 0 0 0 0 10
0 0 0 0 0 0 0 0 0 0 0

Sample input:_

6.5
9.5
5
10
3.5
4.5
3
4
2.5
8.5

Sample output:

0 13 0 0 0 0 0 0 0 0 0 0 0 0
0 0 24 0 0 0 0 0 0 0 0 0 0 0
0 0 0 33 0 0 0 0 0 0 0 0 0 0
0 0 0 0 40 0 0 0 0 0 0 0 0 0
0 0 0 0 0 45 0 0 0 0 0 0 0 0
0 0 0 0 0 0 48 0 0 0 0 0 0 0
0 0 0 0 0 0 0 49 0 0 0 0 0 0
0 0 0 0 0 0 0 0 48 0 0 0 0 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 0 0 0 0 72 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 65 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 56 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 45 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 32 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 17
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 10 0 0 0 0 0 0 0 0 0
0 0 18 0 0 0 0 0 0 0 0
0 0 0 24 0 0 0 0 0 0 0
0 0 0 0 28 0 0 0 0 0 0
0 0 0 0 0 30 0 0 0 0 0
0 0 0 0 0 0 30 0 0 0 0
0 0 0 0 0 0 0 28 0 0 0
0 0 0 0 0 0 0 0 24 0 0
0 0 0 0 0 0 0 0 0 18 0
0 0 0 0 0 0 0 0 0 0 10
0 0 0 0 0 0 0 0 0 0 0

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1clock700.03692019/09/04 17:28:210B / 37B / 31B
2rotary-o700.03852019/09/07 13:13:370B / 31B / 34B
3ludo700.03712019/09/07 23:59:060B / 31B / 38B
4olf710.03842019/09/04 23:50:110B / 35B / 34B
5tompng720.03652019/09/04 23:30:030B / 37B / 33B
6kaki730.03882019/09/07 23:42:370B / 33B / 36B
7siman740.04192019/09/04 05:28:360B / 34B / 33B
8krororo750.03542019/09/07 18:14:360B / 32B / 39B
9tmtms770.03912019/09/07 02:50:520B / 35B / 38B
10llhuii(clock)680.03892019/09/08 00:41:200B / 35B / 31B
11olf(ludo,rotary-o)690.03712019/09/08 00:04:260B / 31B / 37B
12kaki(clock)690.03602019/09/08 00:30:050B / 35B / 32B

Ruby2 _

RankUserSizeTimeDateStatistics
1ludo680.15722019/09/07 23:58:110B / 31B / 36B
2olf690.15632019/09/04 23:50:200B / 35B / 32B
3rotary-o690.20622019/09/07 13:13:250B / 31B / 33B
4tompng720.14812019/09/04 23:29:260B / 37B / 33B
5kaki730.17612019/09/07 23:43:070B / 33B / 36B
6siman740.15962019/09/04 05:21:000B / 34B / 33B
7letranger750.15172019/09/04 22:42:590B / 35B / 39B
8krororo750.15542019/09/07 18:03:560B / 32B / 39B
9tmtms770.15282019/09/07 02:51:000B / 35B / 38B

Perl _

RankUserSizeTimeDateStatistics
1llhuii590.06372019/09/07 23:50:420B / 18B / 40B
2test1620.06432019/09/01 20:39:590B / ?B / ?B
3tails620.03452019/09/01 22:41:490B / 21B / 40B
4llhuii570.03322019/09/08 00:38:040B / 18B / 38B

Python _

RankUserSizeTimeDateStatistics
1clock780.07842019/09/07 22:50:190B / 40B / 35B
2llhuii790.10982019/09/07 08:07:100B / 41B / 35B
3hallvabo980.07462019/09/05 17:47:100B / 53B / 34B
4olf990.07562019/09/05 21:21:070B / 55B / 32B

Python3 _

RankUserSizeTimeDateStatistics
1llhuii810.13842019/09/07 23:32:530B / 43B / 37B
2clock820.12852019/09/06 09:45:340B / 43B / 38B
3mypetlion890.12942019/09/06 03:15:430B / 44B / 44B
4olf950.12642019/09/01 23:59:460B / 53B / 30B

Scheme _

RankUserSizeTimeDateStatistics
1kaki1250.13032019/09/03 19:23:120B / 63B / 53B

JavaScript _

RankUserSizeTimeDateStatistics
1clock820.04892019/09/07 20:29:480B / 41B / 40B
20mg840.04802019/09/07 19:44:590B / 41B / 42B

J _

RankUserSizeTimeDateStatistics
1Frowny550.07032019/09/04 11:54:180B / ?B / ?B

C _

RankUserSizeTimeDateStatistics
1tails1080.03202019/09/07 01:08:440B / 54B / 53B
2olf1090.03212019/09/07 22:04:010B / 55B / 53B
30mg1110.03752019/09/07 22:51:260B / 55B / 55B

Haskell _

RankUserSizeTimeDateStatistics
1_1080.03972019/09/07 21:05:430B / 62B / 44B
2yuki1260.04042019/09/06 17:04:560B / 76B / 43B

AWK _

RankUserSizeTimeDateStatistics
1clock570.04052019/09/06 02:18:140B / 27B / 30B
2olf570.04102019/09/07 21:45:210B / 27B / 30B
3ludo570.04062019/09/07 23:59:310B / 27B / 30B
4llhuii580.03242019/09/07 23:55:210B / 30B / 28B

Bash (builtins) _

RankUserSizeTimeDateStatistics
1tails940.23002019/09/02 10:33:090B / 39B / 48B

xgawk _

RankUserSizeTimeDateStatistics
1llhuii550.03352019/09/07 23:41:290B / 28B / 27B
2olf560.03322019/09/07 22:00:260B / 28B / 28B

R _

RankUserSizeTimeDateStatistics
1ludo630.34832019/09/07 23:57:060B / 34B / 27B
2clock700.37082019/09/06 02:34:560B / 39B / 27B
3olf730.37132019/09/07 21:26:280B / 40B / 30B

GolfScript _

RankUserSizeTimeDateStatistics
1clock440.22742019/09/07 19:12:280B / 3B / 40B
2mitchs (clock)420.22942019/09/08 00:16:380B / 3B / 38B

gs2 _

RankUserSizeTimeDateStatistics
1tails250.37522019/09/02 15:39:1410B / 7B / 7B
2mitchs250.39532019/09/07 22:21:2410B / 7B / 7B

Scala _

RankUserSizeTimeDateStatistics
1rotary-o1028.91842019/09/07 13:36:290B / 55B / 40B

Language Ranking_

RankLangUserSizeScore
1gs2tails2510000
2GolfScriptmitchs (clock)425952
3JFrowny554545
4xgawkllhuii554545
5AWKclock574385
6Perlllhuii574385
7Rludo633968
8Ruby2ludo683676
9Rubyllhuii(clock)683676
10Pythonclock783205
11Python3llhuii813086
12JavaScriptclock823048
13Bash (builtins)tails942659
14Scalarotary-o1022450
15Ctails1082314
16Haskell_1082314
17Schemekaki1252000

return to the top page