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
1tails740.03272017/07/28 10:02:000B / 30B / 43B
2mitchs820.94222017/07/19 21:55:010B / 39B / 40B
3shinh1240.03142017/07/28 02:02:160B / 72B / 47B

Ruby2 _

RankUserSizeTimeDateStatistics
1tails740.06122017/07/28 10:02:150B / 30B / 43B
2mitchs801.57662017/07/19 21:59:360B / 39B / 38B

Perl _

RankUserSizeTimeDateStatistics
1tails670.01632017/07/26 09:18:510B / 28B / 36B
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
1mitchs830.66102017/07/21 10:30:430B / 42B / 40B

Perl6 _

RankUserSizeTimeDateStatistics
1tails735.71992017/07/27 10:14:560B / 31B / 39B

J _

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

C _

RankUserSizeTimeDateStatistics
1tails890.10322017/07/26 09:33:330B / 49B / 40B
2nu960.06222013/01/06 23:30:480B / 47B / 49B
3mitchs1010.24372015/09/11 10:41:280B / 47B / 54B
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
1tails300.36492017/07/26 10:10:249B / 9B / 10B
2llhuii880.21942015/09/10 20:54:580B / 46B / 40B

Bash (builtins) _

RankUserSizeTimeDateStatistics
1tails720.13922017/07/26 10:05:260B / 32B / 38B

Zsh _

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

Fish _

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

dc _

RankUserSizeTimeDateStatistics
1tails720.35752017/07/26 10:33:460B / 55B / 17B

xgawk _

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

Brainfuck _

RankUserSizeTimeDateStatistics
1mitchs (cheat)2440.04132017/07/24 19:26:2448B / 31B / 164B
2g33k7260.00012013/01/29 14:15:1281B / ?B / ?B

GolfScript _

RankUserSizeTimeDateStatistics
1tails560.01842017/07/26 16:38:530B / 23B / 33B

gs2 _

RankUserSizeTimeDateStatistics
1tails180.67062017/07/25 09:19:338B / 5B / 5B
2mitchs190.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

Scala _

RankUserSizeTimeDateStatistics
1rotary-o1198.94572017/08/12 00:01:420B / 70B / 41B

Language Ranking_

RankLangUserSizeScore
1gs2tails1810000
2Bashtails306000
3JI., S.493673
4gorubymitchs553272
5GolfScripttails563214
6Perltails672686
7Bash (builtins)tails722500
8dctails722500
9Perl6tails732465
10Rubytails742432
11Ruby2tails742432
12xgawkllhuii832168
13PARI/GPmitchs832168
14AWKllhuii872068
15Fishllhuii882045
16Zshllhuii882045
17Ctails892022
18Haskellhenkma1001800
19JavaScriptnn1031747
20Pythonmitchs (alt)1041730
21Python3mitchs1081666
22Scalarotary-o1191512
23Groovynn1281406
24Brainfuckmitchs (cheat)244737

return top