Half Catalan triangle
Submit
Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.
Problem
The elements of the Catalan triangle are the sum of the elements above left and above right from it, just like in the Pascal triangle.
1
1
1 1
2 1
2 3 1
5 4 1
5 9 5 1
14 14 6 1
14 28 20 7 1
42 48 27 8 1
42 90 75 35 9 1
132 165 110 44 10 1
132 297 275 154 54 11 1
Print the elements at the even rows and columns of the Catalan triangle. See http://oeis.org/A039599
Options
exec is denied
rejudge feature is enabled
now post-mortem time, all source codes will be revealed
Sample input:_
6
Sample output:
1 0 0 0 0 0 0
1 1 0 0 0 0 0
2 3 1 0 0 0 0
5 9 5 1 0 0 0
14 28 20 7 1 0 0
42 90 75 35 9 1 0
132 297 275 154 54 11 1
Sample input:_
15
Sample output:
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2 3 1 0 0 0 0 0 0 0 0 0 0 0 0 0
5 9 5 1 0 0 0 0 0 0 0 0 0 0 0 0
14 28 20 7 1 0 0 0 0 0 0 0 0 0 0 0
42 90 75 35 9 1 0 0 0 0 0 0 0 0 0 0
132 297 275 154 54 11 1 0 0 0 0 0 0 0 0 0
429 1001 1001 637 273 77 13 1 0 0 0 0 0 0 0 0
1430 3432 3640 2548 1260 440 104 15 1 0 0 0 0 0 0 0
4862 11934 13260 9996 5508 2244 663 135 17 1 0 0 0 0 0 0
16796 41990 48450 38760 23256 10659 3705 950 170 19 1 0 0 0 0 0
58786 149226 177650 149226 95931 48279 19019 5775 1309 209 21 1 0 0 0 0
208012 534888 653752 572033 389367 211508 92092 31878 8602 1748 252 23 1 0 0 0
742900 1931540 2414425 2187185 1562275 904475 427570 164450 50830 12350 2275 299 25 1 0 0
2674440 7020405 8947575 8351070 6216210 3798795 1924065 807300 278460 77805 17199 2898 350 27 1 0
9694845 25662825 33266625 31865925 24582285 15737865 8454225 3817125 1442025 451269 115101 23345 3625 405 29 1
Sample input:_
10
Sample output:
1 0 0 0 0 0 0 0 0 0 0
1 1 0 0 0 0 0 0 0 0 0
2 3 1 0 0 0 0 0 0 0 0
5 9 5 1 0 0 0 0 0 0 0
14 28 20 7 1 0 0 0 0 0 0
42 90 75 35 9 1 0 0 0 0 0
132 297 275 154 54 11 1 0 0 0 0
429 1001 1001 637 273 77 13 1 0 0 0
1430 3432 3640 2548 1260 440 104 15 1 0 0
4862 11934 13260 9996 5508 2244 663 135 17 1 0
16796 41990 48450 38760 23256 10659 3705 950 170 19 1
Ranking
Rank | User | Size | Time | Date | Statistics |
---|
1 | rotary-o | 70 | 0.1837 | 2016/07/31 20:37:41 | 0B / 28B / 39B |
2 | teebee | 70 | 0.2033 | 2016/08/21 20:39:17 | 0B / 35B / 33B |
3 | olf | 89 | 0.2108 | 2016/08/21 11:48:54 | 0B / 40B / 46B |
4 | gmk | 98 | 0.2558 | 2016/07/26 06:05:40 | 0B / 49B / 47B |
5 | mhib | 190 | 0.2098 | 2016/08/16 00:22:11 | 0B / 89B / 94B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | teebee | 50 | 0.0410 | 2016/08/06 22:34:42 | 0B / 19B / 30B |
2 | llhuii | 50 | 0.0450 | 2016/08/08 00:48:04 | 0B / 19B / 30B |
3 | %20 | 78 | 0.0300 | 2016/08/05 09:13:43 | 0B / 19B / 57B |
4 | _ | 88 | 0.0344 | 2016/07/24 22:01:43 | 0B / ?B / ?B |
5 | b_jonas | 88 | 0.0334 | 2016/07/24 22:01:58 | 0B / 29B / 59B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | xsot | 96 | 0.1234 | 2016/08/21 18:23:41 | 0B / 52B / 38B |
2 | Sp3000 | 97 | 0.0966 | 2016/08/21 20:28:43 | 0B / ?B / ?B |
3 | LN | 105 | 0.1048 | 2016/08/21 15:12:46 | 0B / 53B / 49B |
4 | rolf | 129 | 0.0986 | 2016/07/25 00:35:14 | 0B / 68B / 47B |
5 | Sp3000 (xsot) | 94 | 0.0986 | 2016/08/22 02:04:44 | 0B / 49B / 40B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | xsot | 86 | 0.1639 | 2016/08/21 19:49:39 | 0B / 45B / 36B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | teebee | 84 | 0.0464 | 2016/08/05 05:12:45 | 0B / 43B / 41B |
2 | FizzyTea | 102 | 0.0468 | 2016/08/04 09:19:22 | 0B / 50B / 47B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | teebee | 61 | 0.0375 | 2016/08/07 15:59:13 | 0B / 25B / 36B |
2 | llhuii | 61 | 0.0331 | 2016/08/08 00:16:55 | 0B / 27B / 34B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 34 | 0.1106 | 2016/07/27 01:31:05 | 0B / 2B / 31B |
Language Ranking_
Rank | Lang | User | Size | Score |
1 | K | teebee | 34 | 10000 |
2 | GolfScript | tails | 34 | 10000 |
3 | Perl | teebee | 50 | 6800 |
4 | AWK | teebee | 61 | 5573 |
5 | Ruby | rotary-o (mitchs (teebee)) | 66 | 5151 |
6 | Ruby2 | rotary-o | 70 | 4857 |
7 | JavaScript | teebee | 84 | 4047 |
8 | Python3 | xsot | 86 | 3953 |
9 | Python | Sp3000 (xsot) | 94 | 3617 |
return to the top page