From 0cacf99c301fb14220d31619dbf9566ab8d77e17 Mon Sep 17 00:00:00 2001 From: Thibaud Date: Wed, 13 Dec 2023 13:37:00 +0100 Subject: [PATCH] day 9 --- day7/day7.py | 2 +- day9/day9.py | 33 ++++++++ day9/example.txt | 3 + day9/input.txt | 200 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 237 insertions(+), 1 deletion(-) create mode 100644 day9/day9.py create mode 100644 day9/example.txt create mode 100644 day9/input.txt diff --git a/day7/day7.py b/day7/day7.py index 2011dea..7117669 100644 --- a/day7/day7.py +++ b/day7/day7.py @@ -1,5 +1,5 @@ from collections import Counter -from re import sub + def calculate_rank(hand, part2=False): card_ranks = {'2': 1, '3': 2, '4': 3, '5': 4, '6': 5, '7': 6, '8': 7, '9': 8, 'T': 9, 'J': 10, 'Q': 11, 'K': 12, 'A': 13} diff --git a/day9/day9.py b/day9/day9.py new file mode 100644 index 0000000..7d91ab1 --- /dev/null +++ b/day9/day9.py @@ -0,0 +1,33 @@ +def parse_input(infile): + with open(infile) as f: + return [[int(x) for x in l.strip().split()] for l in f.readlines()] + + +def process_line(line): + if set(line) == {0}: + return 0 + else: + next_line = [cur - next for next, cur in zip(line, line[1:])] + return line[-1] + process_line(next_line) + + +def process_line_back(line): + if set(line) == {0}: + return 0 + else: + next_line = [cur - next for next, cur in zip(line, line[1:])] + return line[0] - process_line_back(next_line) + + +def solve(data): + print(f"Part 1: {sum(process_line(l) for l in data)}") + print(f"Part 2: {sum(process_line_back(l) for l in data)}") + + +if __name__ == "__main__": + import sys + import os + SCRIPTPATH = os.path.dirname(os.path.realpath(__file__)) + infile = sys.argv[1] if len(sys.argv) == 2 else "example.txt" + data = parse_input(os.path.join(SCRIPTPATH, infile)) + solve(data) diff --git a/day9/example.txt b/day9/example.txt new file mode 100644 index 0000000..70c5595 --- /dev/null +++ b/day9/example.txt @@ -0,0 +1,3 @@ +0 3 6 9 12 15 +1 3 6 10 15 21 +10 13 16 21 30 45 \ No newline at end of file diff --git a/day9/input.txt b/day9/input.txt new file mode 100644 index 0000000..e84d7bb --- /dev/null +++ b/day9/input.txt @@ -0,0 +1,200 @@ +10 13 27 64 140 281 549 1101 2294 4858 10201 21027 42709 86382 175728 361360 750462 1566611 3268603 6783010 13951998 +19 34 52 73 97 124 154 187 223 262 304 349 397 448 502 559 619 682 748 817 889 +17 26 44 90 198 421 827 1483 2426 3639 5103 7110 11251 22954 57394 152565 397364 990709 2363587 5425543 12050149 +23 34 55 94 159 267 456 809 1511 2974 6087 12696 26528 54998 112755 228528 457939 906582 1769955 3399902 6411185 +13 27 44 66 106 212 497 1166 2538 5079 9491 16942 29573 51480 90442 160750 287587 513515 907742 1578970 2692764 +1 8 28 76 172 354 716 1490 3198 6915 14720 30485 61283 119915 229408 430889 797095 1455082 2623652 4673906 8225526 +-3 5 16 26 37 58 110 243 573 1347 3044 6520 13205 25360 46402 81305 137085 223377 353112 543302 815941 +20 44 95 198 403 806 1585 3064 5819 10840 19770 35271 61655 106168 181980 315548 564578 1060004 2098881 4338784 9183751 +11 17 29 64 153 350 754 1553 3099 6023 11399 20966 37417 64764 108788 177583 282203 437421 662609 982748 1429577 +15 23 43 95 224 524 1173 2494 5085 10107 19900 39256 78000 156163 314217 632971 1271436 2537313 5015496 9797973 18888265 +-3 -6 -10 -3 44 181 485 1069 2097 3823 6706 11715 21054 39774 79253 164654 350909 756900 1637990 3538025 7603072 +15 24 39 60 85 117 188 413 1095 2925 7376 17500 39539 86134 182650 379673 778035 1579706 3192165 6441832 13004669 +6 18 40 82 177 389 822 1635 3067 5473 9380 15629 25852 43976 80372 162060 355758 816973 1890831 4315400 9629275 +0 -9 -23 -29 0 101 310 655 1177 2023 3701 7704 17986 44363 110077 267928 633224 1448352 3204545 6863560 14248490 +12 38 85 159 263 397 558 740 934 1128 1307 1453 1545 1559 1468 1242 848 250 -591 -1717 -3173 +11 23 53 116 248 519 1041 1963 3448 5650 8761 13288 20862 36099 70366 148812 322789 690925 1433769 2869296 5539872 +8 26 56 112 230 481 987 1939 3625 6508 11475 20557 38782 78504 168755 374185 831386 1815370 3856374 7937866 15821706 +13 10 11 17 25 35 61 149 409 1085 2731 6646 15861 37180 85069 188576 402965 828372 1638555 3123727 5752545 +9 6 11 34 97 250 604 1397 3129 6850 14770 31483 66259 137080 277451 547674 1053553 1977942 3634997 6564680 11697717 +10 23 53 115 238 476 937 1850 3695 7426 14822 29006 55177 101605 180944 311923 521480 847409 1341595 2073917 3136904 +5 17 52 132 288 568 1063 1960 3637 6820 12825 23910 43766 78187 135984 230256 380213 613875 972162 1515160 2331716 +-3 5 23 69 176 392 780 1418 2399 3831 5837 8555 12138 16754 22586 29832 38705 49433 62259 77441 95252 +13 23 36 69 156 357 771 1566 3045 5782 10898 20613 39315 75556 145710 280790 539833 1037897 2007196 3931949 7840962 +13 33 72 142 264 476 847 1512 2768 5305 10692 22314 47112 98827 204221 415374 834390 1662953 3300286 6532935 12895485 +3 2 -4 -7 13 102 361 994 2396 5340 11385 23712 48683 98459 194909 374637 694045 1231738 2083182 3339595 5040493 +24 37 47 45 29 16 54 234 702 1671 3433 6371 10971 17834 27688 41400 59988 84633 116691 157705 209417 +7 9 24 70 168 340 608 1002 1608 2736 5382 12318 30388 74926 177641 399813 853169 1731287 3354704 6232938 11146188 +13 19 40 84 171 353 740 1531 3047 5761 10318 17536 28377 43875 65006 92483 126457 166103 209068 250756 283423 +21 38 72 129 215 336 498 707 969 1290 1676 2133 2667 3284 3990 4791 5693 6702 7824 9065 10431 +-2 15 47 94 156 233 325 432 554 691 843 1010 1192 1389 1601 1828 2070 2327 2599 2886 3188 +28 41 54 81 162 373 841 1771 3487 6485 11506 19691 33041 55803 98311 186795 386856 856817 1963836 4527177 10310638 +-5 7 33 73 127 195 277 373 483 607 745 897 1063 1243 1437 1645 1867 2103 2353 2617 2895 +14 29 42 48 48 56 119 366 1104 2996 7403 17064 37440 79275 163244 327980 643314 1231239 2297936 4181192 7418712 +22 36 66 125 242 472 911 1740 3342 6559 13177 26736 53745 105331 199283 362432 633466 1066806 1739272 2763059 4310832 +2 0 -2 -4 -6 -8 -10 -12 -14 -16 -18 -20 -22 -24 -26 -28 -30 -32 -34 -36 -38 +18 25 43 101 251 576 1198 2286 4064 6819 10909 16771 24929 36002 50712 69892 94494 125597 164415 212305 270775 +24 41 62 89 137 245 493 1033 2146 4346 8583 16683 32370 63687 128687 268561 577177 1265569 2797915 6167557 13435492 +10 23 59 142 319 664 1287 2355 4126 6987 11474 18238 27920 40958 57585 78915 111446 180159 360593 849158 2105337 +5 0 -3 -5 -15 -47 -106 -146 40 1067 4438 13380 34212 78563 167101 336150 649903 1223206 2263499 4145957 7543779 +16 38 69 109 158 216 283 359 444 538 641 753 874 1004 1143 1291 1448 1614 1789 1973 2166 +16 30 55 90 128 156 159 130 90 140 615 2498 8391 24556 64904 158512 363744 795381 1678545 3459099 7033146 +0 17 56 133 268 479 772 1138 1582 2223 3518 6677 14350 31681 67838 138142 266932 491317 865980 1469213 2410376 +9 14 18 23 44 138 451 1290 3237 7336 15399 30489 57642 104880 184536 314852 521713 840234 1315712 2003179 2964432 +11 10 18 56 159 387 844 1703 3235 5840 10078 16698 26663 41169 61656 89809 127547 176998 240458 320332 419055 +12 22 46 111 273 640 1418 2991 6045 11748 22003 39799 69696 118494 196153 317051 501690 778986 1189308 1788463 2652859 +9 20 46 93 169 298 556 1147 2553 5815 13032 28202 58573 116723 223646 413186 738233 1279174 2155178 3538987 5675985 +17 27 31 26 8 -28 -88 -179 -309 -487 -723 -1028 -1414 -1894 -2482 -3193 -4043 -5049 -6229 -7602 -9188 +3 10 17 23 29 45 101 260 633 1406 2914 5844 11725 23975 49930 104485 216239 437362 858799 1632901 3006133 +10 8 8 28 102 295 731 1632 3366 6511 11973 21266 37189 65337 117179 215849 406358 772694 1465306 2743876 5042228 +10 24 52 108 211 389 690 1212 2176 4085 8041 16334 33475 67922 134847 260416 488206 888566 1571946 2707472 4548339 +23 46 74 102 132 190 360 846 2086 4965 11207 24069 49513 98095 187883 348799 628873 1103000 1884904 3143136 5122066 +-1 6 32 102 264 611 1309 2632 5004 9057 15753 26720 45185 78396 143498 281002 584247 1261461 2762805 6035330 13028230 +23 40 75 153 321 670 1385 2844 5793 11630 22837 43605 80703 144648 251239 423524 694275 1109052 1729943 2640073 3948981 +15 25 33 46 80 167 367 787 1614 3183 6133 11763 22795 44891 89465 178588 353113 685557 1299777 2400076 4313082 +13 32 58 102 196 405 841 1677 3159 5614 9452 15160 23286 34411 49107 67879 91089 118860 150958 186650 224536 +10 21 51 112 231 474 985 2040 4116 7975 14763 26124 44329 72420 114369 175252 261438 380793 542899 759288 1043691 +12 33 57 95 176 359 763 1632 3463 7247 14924 30272 60710 121017 240939 480350 958458 1908109 3773455 7380505 14227480 +17 26 49 105 238 534 1144 2317 4455 8221 14772 26271 46982 85505 159107 301701 577877 1106564 2099475 3921541 7183166 +-7 0 20 61 139 279 523 962 1815 3588 7363 15297 31469 63337 124349 238908 452432 852898 1618891 3129293 6215242 +30 60 106 166 244 363 592 1102 2271 4874 10429 21829 44475 88235 170685 322233 593876 1068480 1876588 3217832 5389030 +25 34 38 29 -6 -85 -231 -472 -841 -1376 -2120 -3121 -4432 -6111 -8221 -10830 -14011 -17842 -22406 -27791 -34090 +14 27 64 140 270 469 752 1134 1630 2255 3024 3952 5054 6345 7840 9554 11502 13699 16160 18900 21934 +3 3 2 -2 -10 -23 -34 18 380 1774 5941 16569 40769 91302 189803 371295 690337 1229205 2108564 3501152 5649064 +11 27 63 132 250 436 723 1190 2024 3624 6767 12869 24390 45446 82694 146534 252605 423413 689683 1090630 1671742 +10 21 43 84 174 383 853 1859 3938 8162 16688 33820 68032 135885 269855 534392 1059114 2106599 4207317 8419480 16811962 +4 8 20 39 64 94 128 165 204 244 284 323 360 394 424 449 468 480 484 479 464 +14 32 62 100 152 246 451 914 1930 4064 8348 16580 31756 58670 104721 180970 303494 495088 787370 1223348 1860512 +24 36 57 108 225 475 977 1923 3594 6366 10701 17118 26139 38205 53557 72077 93084 115080 135441 150048 152853 +8 30 64 111 189 360 771 1716 3739 7818 15697 30467 57538 106192 191962 340144 590818 1005830 1678270 2745071 4403451 +19 26 41 67 115 229 536 1331 3207 7240 15239 30071 56071 99547 169390 277799 441131 680886 1024837 1508315 2175659 +12 31 72 154 300 536 888 1386 2103 3281 5625 10880 22845 49022 103147 208904 405182 753299 1346686 2323598 3883498 +14 33 55 75 87 84 58 0 -100 -253 -471 -767 -1155 -1650 -2268 -3026 -3942 -5035 -6325 -7833 -9581 +18 18 14 9 5 10 67 329 1226 3800 10322 25351 57449 121828 244275 466779 855370 1510774 2582590 4287805 6934581 +11 26 67 162 365 774 1563 3031 5671 10277 18150 31560 54814 96640 175240 328510 634023 1247352 2475005 4913050 9710375 +10 12 21 49 125 306 694 1465 2935 5720 11101 21812 43698 89177 184454 384515 804128 1681341 3505647 7271462 14966863 +3 7 8 7 5 3 2 3 7 15 28 47 73 107 150 203 267 343 432 535 653 +7 22 61 136 259 442 697 1036 1471 2014 2677 3472 4411 5506 6769 8212 9847 11686 13741 16024 18547 +2 9 21 39 72 152 353 825 1866 4069 8597 17657 35264 68408 128761 235087 416546 717113 1201365 1961923 3128872 +-1 -9 -21 -43 -89 -180 -326 -472 -384 561 3748 11992 30761 70471 150894 309768 619705 1221143 2385397 4632275 8943215 +23 52 99 163 235 306 400 654 1471 3780 9454 21971 47481 96644 188123 355863 665091 1247984 2382457 4663003 9363499 +-5 -8 -13 -23 -40 -64 -92 -111 -72 193 1206 4443 13762 38657 101444 252655 602917 1386566 3083809 6646613 13901608 +-1 -5 3 40 139 377 928 2149 4706 9750 19171 36016 65299 115731 203485 360222 649705 1201404 2277721 4408645 8664071 +22 29 51 104 202 350 529 676 665 294 -722 -2761 -6329 -12159 -21434 -36219 -60216 -99989 -166843 -279582 -468416 +12 31 57 90 149 301 705 1683 3848 8355 17405 35234 69972 136982 264623 503889 944168 1738619 3144657 5588178 9765043 +3 6 17 54 145 328 651 1172 1959 3090 4653 6746 9477 12964 17335 22728 29291 37182 46569 57630 70553 +20 47 88 143 212 295 392 503 628 767 920 1087 1268 1463 1672 1895 2132 2383 2648 2927 3220 +11 14 24 51 99 172 295 560 1216 2832 6583 14759 31696 65486 131013 254962 483123 888785 1576642 2666148 4215487 +5 28 69 136 250 453 812 1413 2334 3583 5005 6234 6941 7983 14726 45075 147219 437194 1177122 2937595 6934002 +-3 -1 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 +23 47 92 168 290 484 790 1270 2052 3476 6455 13223 28713 62891 134467 276511 544621 1028421 1867310 3271538 5549852 +5 8 25 63 129 230 373 565 813 1124 1505 1963 2505 3138 3869 4705 5653 6720 7913 9239 10705 +7 4 -4 -18 -39 -68 -106 -154 -213 -284 -368 -466 -579 -708 -854 -1018 -1201 -1404 -1628 -1874 -2143 +8 22 47 86 140 213 338 647 1519 3852 9518 22074 47817 97287 187339 343923 605730 1028882 1692865 2707926 4224178 +8 7 20 67 186 446 975 2011 3989 7695 14557 27226 50783 95304 181324 351286 692830 1384471 2781802 5574133 11059128 +0 17 56 127 240 405 632 931 1312 1785 2360 3047 3856 4797 5880 7115 8512 10081 11832 13775 15920 +9 7 5 3 1 -1 -3 -5 -7 -9 -11 -13 -15 -17 -19 -21 -23 -25 -27 -29 -31 +18 27 50 102 215 449 903 1726 3128 5391 8880 14054 21477 31829 45917 64686 89230 120803 160830 210918 272867 +2 6 24 80 226 564 1280 2708 5456 10649 20394 38681 73153 138584 263617 503538 963971 1844077 3514433 6656595 12512437 +21 31 38 50 89 195 439 964 2083 4473 9514 19832 40115 78281 147087 266278 465385 787291 1292694 2065606 3220037 +27 44 68 103 157 254 450 847 1602 2948 5302 9667 18798 40080 91876 216401 504165 1137956 2468512 5139831 10289931 +12 16 15 10 8 26 103 329 914 2351 5782 13764 31764 70901 152714 317085 634904 1227650 2296801 4166902 7347240 +24 40 66 108 186 352 726 1577 3503 7817 17343 37986 81677 171612 351112 698024 1347788 2531473 4643823 8378986 15025772 +18 24 33 60 146 376 917 2087 4466 9061 17542 32590 58476 102196 175971 302974 530317 957661 1798344 3506829 7040265 +26 54 90 124 146 164 233 506 1327 3392 8018 17601 36452 72475 140829 272293 532468 1064838 2183738 4566562 9634194 +2 12 36 85 187 410 895 1906 3927 7876 15570 30669 60453 118946 232119 446279 841554 1554212 2815554 5023317 8877249 +11 38 85 165 304 547 972 1729 3140 5939 11821 24642 52934 114998 248951 532138 1117933 2304140 4657409 9234315 17964728 +19 31 43 55 67 79 91 103 115 127 139 151 163 175 187 199 211 223 235 247 259 +13 26 59 122 223 375 619 1082 2112 4569 10405 23745 52808 113245 233970 467633 910119 1737872 3280091 6157476 11543989 +9 23 59 125 224 354 511 698 943 1328 2029 3364 5842 10201 17417 28659 45157 67941 97399 132591 170244 +18 33 50 65 85 140 299 710 1707 4075 9657 22645 52146 117004 254495 535614 1091707 2161171 4173032 7901130 14758416 +9 20 40 84 183 394 810 1570 2869 4968 8204 13000 19875 29454 42478 59814 82465 111580 148464 194588 251599 +19 30 47 75 111 153 223 409 933 2265 5347 12093 26525 57232 122347 258981 540095 1103200 2197127 4255487 8008435 +2 -1 -7 -20 -48 -107 -210 -317 -212 745 4082 13075 34379 81200 179516 380139 781514 1571431 3100731 6009170 11433534 +27 53 97 166 267 415 665 1188 2416 5280 11555 24318 48566 92259 168738 303202 549777 1033491 2046105 4250726 9094061 +26 39 52 65 78 91 104 117 130 143 156 169 182 195 208 221 234 247 260 273 286 +23 28 30 29 28 40 113 386 1196 3278 8149 18863 41505 88134 182530 371286 744869 1476728 2893904 5600425 10685362 +-3 10 52 137 290 559 1027 1829 3186 5487 9496 16849 31158 60316 121168 248972 516815 1075808 2237856 4642837 9586726 +14 28 52 96 173 311 577 1118 2238 4549 9257 18670 37043 71904 136034 250302 447582 778002 1315794 2168028 3485521 +12 10 19 69 218 566 1268 2541 4663 7985 13046 21042 35235 64539 131731 290932 662942 1504036 3336277 7189251 15040904 +21 40 75 145 291 595 1212 2420 4707 8937 16660 30642 55676 99679 174968 299426 497005 796658 1228341 1814179 2552253 +5 -1 -9 -10 7 57 170 418 964 2142 4591 9507 19185 38292 76948 158114 334787 728489 1611871 3578712 7879983 +15 30 54 91 156 290 575 1149 2221 4086 7140 11895 18994 29226 43541 63065 89115 123214 167106 222771 292440 +26 36 60 112 205 351 561 845 1212 1670 2226 2886 3655 4537 5535 6651 7886 9240 10712 12300 14001 +2 7 25 83 215 469 935 1803 3460 6635 12601 23443 42401 74297 126055 207323 331206 515119 781769 1160275 1687435 +17 39 74 124 191 277 384 514 669 851 1062 1304 1579 1889 2236 2622 3049 3519 4034 4596 5207 +-3 -9 -11 7 67 194 414 759 1296 2216 4046 8082 17184 37125 78745 161228 316895 597989 1086019 1904329 3234665 +8 16 23 27 22 -2 -59 -167 -348 -628 -1037 -1609 -2382 -3398 -4703 -6347 -8384 -10872 -13873 -17453 -21682 +19 41 88 184 364 671 1148 1819 2652 3500 4020 3570 1086 -5013 -16635 -34647 -53835 -48048 68522 534603 1954552 +17 35 62 94 123 145 181 319 796 2164 5632 13759 31806 70256 149301 306498 609339 1175193 2201994 4014204 7130013 +13 20 27 34 41 48 55 62 69 76 83 90 97 104 111 118 125 132 139 146 153 +7 -3 -15 -19 2 72 222 490 921 1567 2487 3747 5420 7586 10332 13752 17947 23025 29101 36297 44742 +16 24 32 51 122 332 835 1897 4000 8054 15770 30238 56744 103886 185183 321730 547208 917948 1533084 2573509 4373862 +-7 3 40 115 232 388 578 804 1097 1595 2790 6175 15700 40696 101260 237524 524769 1097003 2182412 4155027 7608040 +-1 16 47 92 164 316 689 1594 3644 7967 16584 33176 64775 125542 245009 485472 977581 1991294 4074185 8315444 16839374 +23 38 62 115 228 453 880 1663 3063 5522 9788 17117 29584 50541 85266 141853 232399 374550 593474 924335 1415348 +21 43 84 161 309 589 1103 2028 3681 6627 11842 20943 36497 62421 104485 170930 273213 426891 652656 977533 1436253 +-1 0 22 77 169 303 511 910 1829 4073 9445 21749 48689 105416 221026 450160 893099 1729494 3273248 6059213 10976433 +-9 -12 -16 -21 -26 -25 13 196 824 2622 7193 17896 41579 92080 197440 414961 862813 1786164 3693918 7636129 15753420 +15 19 18 5 -35 -133 -334 -656 -953 -581 2306 12127 38432 100587 236346 517687 1080427 2180027 4296650 8331021 15963515 +15 31 54 79 116 218 529 1357 3275 7265 14970 29255 55600 105551 204889 411927 856335 1817519 3875878 8193119 17013220 +17 38 86 173 311 512 788 1151 1613 2186 2882 3713 4691 5828 7136 8627 10313 12206 14318 16661 19247 +15 29 65 148 318 630 1167 2088 3740 6868 12960 24765 47021 87427 157888 276055 467173 766239 1220459 1891978 2860840 +13 20 40 94 216 459 901 1657 2924 5130 9334 18141 37563 80483 172673 362688 737415 1445608 2732396 4988520 8818946 +10 14 40 102 214 390 644 990 1442 2014 2720 3574 4590 5782 7164 8750 10554 12590 14872 17414 20230 +-2 2 18 69 188 421 841 1589 2968 5626 10874 21195 41010 77777 143509 256807 445514 750106 1227946 1958537 3049920 +5 14 32 74 162 325 599 1027 1659 2552 3770 5384 7472 10119 13417 17465 22369 28242 35204 43382 52910 +-3 -3 12 62 189 478 1087 2286 4500 8343 14633 24427 39268 62169 100447 172395 320864 637864 1304863 2653271 5249412 +18 37 78 157 301 564 1062 2032 3928 7589 14553 27650 52089 97362 180425 330785 598326 1064949 1861384 3190859 5361685 +24 49 85 135 203 294 426 663 1178 2355 4939 10243 20421 38816 70392 122259 204300 329909 516849 788239 1173679 +-6 6 27 49 55 28 -24 -23 259 1359 4471 12225 30376 71273 160582 349623 736928 1504324 2975091 5704649 10617909 +22 34 46 58 70 82 94 106 118 130 142 154 166 178 190 202 214 226 238 250 262 +-1 11 38 85 175 375 843 1901 4147 8641 17247 33319 63167 119310 227777 444324 889598 1823128 3794302 7941695 16571260 +14 21 44 93 193 395 795 1581 3146 6327 12848 26059 52098 101731 193492 359603 657898 1196185 2180968 4011313 7452315 +12 14 25 58 144 353 838 1924 4272 9156 18899 37522 71668 131871 234248 402700 671716 1089882 1724205 2665370 4034056 +-7 -4 2 8 24 88 285 785 1940 4520 10226 22707 49462 105293 218500 441937 872607 1685968 3194942 5949254 10898776 +9 15 27 45 69 99 135 177 225 279 339 405 477 555 639 729 825 927 1035 1149 1269 +1 7 18 33 56 109 254 618 1427 3089 6443 13441 28783 63396 141114 310383 663073 1362143 2678340 5032341 9031334 +8 30 62 96 130 188 356 843 2075 4824 10363 20622 38299 66854 110283 172533 256378 361530 481708 600332 684448 +16 33 68 127 220 368 624 1130 2258 4917 11148 25171 55086 115463 231105 442406 813124 1442381 2484872 4187559 6958992 +19 46 82 129 190 262 327 341 221 -170 -1040 -2687 -5520 -10082 -17075 -27387 -42121 -62626 -90530 -127775 -176654 +10 24 54 110 204 349 564 899 1500 2745 5512 11728 25576 56253 124229 275003 608250 1337779 2912588 6259085 13264076 +17 23 29 41 78 187 464 1081 2324 4661 8898 16588 31128 60596 124667 270430 606415 1371815 3070427 6718531 14285838 +22 32 42 52 62 72 82 92 102 112 122 132 142 152 162 172 182 192 202 212 222 +-5 -2 14 47 110 246 558 1248 2665 5362 10162 18233 31172 51098 80754 123618 184023 267286 379846 529411 725114 +11 14 14 12 17 45 109 196 228 5 -871 -3091 -7752 -16486 -31602 -56237 -94511 -151680 -234280 -350254 -509053 +8 25 62 147 337 733 1495 2857 5142 8777 14308 22415 33927 49837 71317 99733 136660 183897 243482 317707 409133 +-1 2 22 77 206 494 1107 2337 4657 8786 15764 27037 44552 70862 109241 163809 239667 343042 481442 663821 900754 +24 50 87 141 235 417 780 1509 2981 5974 12102 24700 50566 103297 209592 421173 837594 1650633 3232271 6311824 12336389 +3 4 0 -11 -31 -62 -106 -165 -241 -336 -452 -591 -755 -946 -1166 -1417 -1701 -2020 -2376 -2771 -3207 +26 56 103 171 263 374 481 535 462 192 -233 -348 1536 10273 38409 116432 315337 794905 1904134 4384770 9774416 +6 11 29 74 169 361 747 1512 2977 5651 10278 17870 29722 47417 72850 108332 156880 222859 313219 439666 622223 +23 48 87 144 228 356 556 870 1357 2096 3189 4764 6978 10020 14114 19522 26547 35536 46883 61032 78480 +7 15 30 59 118 247 531 1134 2358 4744 9237 17442 32003 57142 99400 168627 279273 452037 715936 1110861 1690692 +10 20 35 72 171 399 849 1634 2876 4690 7163 10328 14133 18405 22809 26802 29582 30032 26659 17528 191 +17 24 41 86 185 378 726 1315 2257 3693 5819 9007 14216 24133 45917 97130 217557 491334 1086409 2322292 4782951 +28 50 92 173 315 552 963 1749 3391 6963 14740 31356 65972 136277 275762 546694 1062683 2026717 3792870 6961951 12521696 +19 33 62 123 238 445 831 1611 3295 7007 15059 31967 66268 133815 263764 509311 966491 1806133 3326508 6037459 10791026 +10 33 62 103 170 279 432 598 711 726 824 1981 7389 25746 78354 213440 533320 1243135 2734058 5719219 11447172 +14 38 84 172 346 686 1315 2398 4130 6710 10298 14952 20542 26638 32369 36250 35974 28166 8096 -30652 -96558 +-4 -7 4 44 142 351 756 1480 2700 4708 8097 14248 26490 52673 110540 238385 515388 1099471 2297118 4692616 9389926 +0 6 25 74 182 400 827 1669 3375 6951 14655 31438 67733 144521 302035 614015 1210114 2309892 4272837 7670034 13384480 +4 4 19 61 137 257 453 819 1604 3423 7695 17472 38889 83542 172189 340268 645836 1180654 2085275 3569135 5936801 +23 35 63 126 262 545 1119 2269 4556 9053 17729 34038 63788 116413 206897 358912 610506 1025617 1719513 2917815 5094961 +-2 2 18 53 121 253 507 978 1808 3196 5408 8787 13763 20863 30721 44088 61842 84998 114718 152321 199293 +7 30 82 181 345 604 1027 1764 3103 5542 9876 17299 29521 48900 78589 122698 186471 276478 400822 569361 793945 +2 1 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 +9 27 62 117 209 384 732 1402 2617 4689 8034 13187 20817 31742 46944 67584 95017 130807 176742 234849 307409 +14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 +4 -2 2 38 132 311 614 1135 2124 4178 8555 17641 35601 69268 129400 232611 404624 686090 1143180 1886628 3105054 +23 43 65 96 152 251 408 637 979 1607 3116 7197 18033 44964 107278 242436 519683 1061911 2079959 3925518 7171954 +19 30 48 82 149 279 533 1042 2082 4223 8630 17649 35876 71974 141561 271527 506133 915180 1604388 2727868 4502175 +-2 10 28 49 82 163 379 902 2034 4263 8331 15326 26840 45287 74538 121073 195819 316657 511115 817796 1283175 +-1 6 21 56 143 340 732 1425 2531 4142 6291 8898 11699 14156 15346 13827 7479 -6682 -32719 -76020 -143577 +-2 5 31 87 183 346 655 1303 2709 5736 12147 25576 53541 111459 230443 472374 959476 1933664 3877553 7761688 15543715 +17 21 35 67 125 217 351 535 777 1085 1467 1931 2485 3137 3895 4767 5761 6885 8147 9555 11117 +3 -3 -10 -3 61 271 784 1851 3847 7305 12954 21761 34977 54187 81364 118927 169803 237493 326142 440613 586565 +9 14 23 31 27 -4 -60 -59 296 1760 5938 15871 36864 77606 151633 279185 489507 823642 1337761 2107071 3230337 +2 -3 -6 -2 32 164 541 1440 3358 7187 14584 28795 56492 111724 223987 453837 921594 1857745 3687926 7171172 13617848 +11 12 28 74 163 318 608 1232 2687 6079 13683 29941 63217 128815 254019 486241 905771 1645118 2917518 5057868 8580127 +6 10 30 80 170 314 561 1060 2170 4641 9947 20986 43640 90222 186816 388245 807350 1670120 3415956 6874320 13566998