Paths in matrix 2

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

For the following 10x10 matrix, consider paths from top-left to bottom-right. For each path, calculate the sum of the element values on the path.


1 1 1 1 1 1 1 1 1 1
2 2 2 2 2 2 2 2 2 2
3 3 3 3 3 3 3 3 3 3
4 4 4 4 4 4 4 4 4 4
5 5 5 5 5 5 5 5 5 5
6 6 6 6 6 6 6 6 6 6
7 7 7 7 7 7 7 7 7 7
8 8 8 8 8 8 8 8 8 8
9 9 9 9 9 9 9 9 9 9
10 10 10 10 10 10 10 10 10 10

Output sum and the number of paths having the sum.

Inspired by
http://www.nichinoken.co.jp/column/shikakumaru/2012/1212_sa.html
which is an entrance exam to a junior high school in Japan.

--nn

Options

exec is denied

no deadline, the server will not save your submission

Sample input:_

*NOTHING*

Sample output:

64:1
65:1
66:2
67:3
68:5
69:7
70:11
71:15
72:22
73:30
74:40
75:52
76:69
77:87
78:111
79:138
80:171
81:207
82:251
83:297
84:352
85:411
86:476
87:545
88:622
89:699
90:782
91:867
92:954
93:1040
94:1128
95:1210
96:1292
97:1368
98:1437
99:1499
100:1555
101:1598
102:1632
103:1656
104:1667
105:1667
106:1656
107:1632
108:1598
109:1555
110:1499
111:1437
112:1368
113:1292
114:1210
115:1128
116:1040
117:954
118:867
119:782
120:699
121:622
122:545
123:476
124:411
125:352
126:297
127:251
128:207
129:171
130:138
131:111
132:87
133:69
134:52
135:40
136:30
137:22
138:15
139:11
140:7
141:5
142:3
143:2
144:1
145:1

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1mitchs830.94632015/09/10 07:28:020B / 42B / 39B

Ruby2 _

RankUserSizeTimeDateStatistics
1mitchs811.54672015/10/27 19:11:310B / 42B / 37B

Perl _

RankUserSizeTimeDateStatistics
1tails890.43012013/01/03 17:34:540B / 35B / 51B
2brx1020.00012013/01/06 05:39:4317B / 43B / 39B
3brx(regex)1490.75942013/01/02 05:10:200B / 48B / 90B

Python _

RankUserSizeTimeDateStatistics
1mitchs (alt)1040.12792015/09/10 08:19:190B / 71B / 26B
2mitchs1040.12552015/11/20 05:51:050B / 71B / 26B
3mitchs ()1132.21732015/11/21 01:29:330B / 59B / 42B
4llhuii1140.11242015/09/10 21:19:530B / 56B / 53B
5recursive1170.39192013/01/16 07:19:170B / 69B / 37B
6leonid1170.21042013/01/16 10:04:410B / 58B / 52B
7hallvabo1180.36372012/12/31 22:48:360B / 57B / 56B
8rolf1300.26792013/01/01 02:38:540B / 62B / 54B

Python3 _

RankUserSizeTimeDateStatistics
1mitchs1080.18292015/09/10 08:21:220B / 74B / 27B

JavaScript _

RankUserSizeTimeDateStatistics
1nn1031.28042013/01/02 23:13:530B / 47B / 52B
2nn(for check)2071.40072012/12/30 21:14:160B / 88B / 82B

PARI/GP _

RankUserSizeTimeDateStatistics
1mitchs950.22322015/09/10 22:37:480B / 50B / 42B

J _

RankUserSizeTimeDateStatistics
1I., S.490.11752013/01/02 23:07:380B / 10B / 39B

C _

RankUserSizeTimeDateStatistics
1nu960.06222013/01/06 23:30:480B / 47B / 49B
2mitchs1010.24372015/09/11 10:41:280B / 47B / 54B
3tails1100.00012013/01/03 20:55:170B / 46B / 64B
4llhuii1100.00012015/09/11 00:51:370B / 49B / 61B
5nn1160.02792013/01/03 09:57:180B / 51B / 65B
6twobit1170.00012013/01/04 08:26:5716B / 51B / 50B
7Rengeshiwara1300.69132013/01/01 17:09:400B / ?B / ?B

Haskell _

RankUserSizeTimeDateStatistics
1henkma1001.81992013/01/02 08:48:470B / 49B / 47B

AWK _

RankUserSizeTimeDateStatistics
1llhuii870.22602015/09/10 21:33:090B / 47B / 39B
2mitchs890.82142015/11/21 01:55:130B / 46B / 41B
3nn961.43592013/01/05 14:02:120B / 47B / 47B

Bash _

RankUserSizeTimeDateStatistics
1llhuii880.21942015/09/10 20:54:580B / 46B / 40B

Zsh _

RankUserSizeTimeDateStatistics
1llhuii880.21022015/09/10 20:57:150B / 46B / 40B

Fish _

RankUserSizeTimeDateStatistics
1llhuii880.22482015/09/10 20:57:100B / 46B / 40B

xgawk _

RankUserSizeTimeDateStatistics
1llhuii830.29422015/09/10 21:32:060B / 43B / 39B
2mitchs840.22032015/11/21 01:50:090B / 42B / 40B

Brainfuck _

RankUserSizeTimeDateStatistics
1g33k7260.00012013/01/29 14:15:1281B / ?B / ?B

GolfScript _

RankUserSizeTimeDateStatistics
1tails730.03012013/01/06 00:53:1018B / 22B / 32B

gs2 _

RankUserSizeTimeDateStatistics
1mitchs190.60202015/09/10 08:40:449B / 5B / 5B

goruby _

RankUserSizeTimeDateStatistics
1mitchs550.66322015/09/10 07:33:040B / 24B / 29B

Groovy _

RankUserSizeTimeDateStatistics
1nn1282.66242013/01/05 16:34:100B / 63B / 62B

Language Ranking_

RankLangUserSizeScore
1gs2mitchs1910000
2JI., S.493877
3gorubymitchs553454
4GolfScripttails732602
5Ruby2mitchs812345
6Rubymitchs832289
7xgawkllhuii832289
8AWKllhuii872183
9Bashllhuii882159
10Fishllhuii882159
11Zshllhuii882159
12Perltails892134
13PARI/GPmitchs952000
14Cnu961979
15Haskellhenkma1001900
16JavaScriptnn1031844
17Pythonmitchs (alt)1041826
18Python3mitchs1081759
19Groovynn1281484
20Brainfuckg33k726261

return top