14 files changed +1849
-1
lines changed Original file line number Diff line number Diff line change
1
+ let fs = require ( 'fs' ) ;
2
+
3
+ let day = parseInt ( process . argv [ 2 ] ) ;
4
+ let challenge = parseInt ( process . argv [ 3 ] ) ;
5
+
6
+ fs . readFile ( `./input/${ day } .txt` , 'utf8' , function ( err , data ) {
7
+ if ( err ) {
8
+ return console . error ( err ) ;
9
+ }
10
+ let result = require ( `./solutions/day${ day } .ts` ) [ challenge - 1 ] ( data ) ;
11
+ console . log ( 'Result:' , result ) ;
12
+ } ) ;
Original file line number Diff line number Diff line change
1
+ 818275977931166178424892653779931342156567268946849597948944469863818248114327524824136924486891794739281668741616818614613222585132742386168687517939432911753846817997473555693821316918473474459788714917665794336753628836231159578734813485687247273288926216976992516314415836985611354682821892793983922755395577592859959966574329787693934242233159947846757279523939217844194346599494858459582798326799512571365294673978955928416955127211624234143497546729348687844317864243859238665326784414349618985832259224761857371389133635711819476969854584123589566163491796442167815899539788237118339218699137497532932492226948892362554937381497389469981346971998271644362944839883953967698665427314592438958181697639594631142991156327257413186621923369632466918836951277519421695264986942261781256412377711245825379412978876134267384793694756732246799739464721215446477972737883445615664755923441441781128933369585655925615257548499628878242122434979197969569971961379367756499884537433839217835728263798431874654317137955175565253555735968376115749641527957935691487965161211853476747758982854811367422656321836839326818976668191525884763294465366151349347633968321457954152621175837754723675485348339261288195865348545793575843874731785852718281311481217515834822185477982342271937155479432673815629144664144538221768992733498856934255518875381672342521819499939835919827166318715849161715775427981485233467222586764392783699273452228728667175488552924399518855743923659815483988899924199449721321589476864161778841352853573584489497263216627369841455165476954483715112127465311353411346132671561568444626828453687183385215975319858714144975174516356117245993696521941589168394574287785233685284294357548156487538175462176268162852746996633977948755296869616778577327951858348313582783675149343562362974553976147259225311183729415381527435926224781181987111454447371894645359797229493458443522549386769845742557644349554641538488252581267341635761715674381775778868374988451463624332123361576518411234438681171864923916896987836734129295354684962897616358722633724198278552339794629939574841672355699222747886785616814449297817352118452284785694551841431869545321438468118
Original file line number Diff line number Diff line change
1
+ 790 99 345 1080 32 143 1085 984 553 98 123 97 197 886 125 947
2
+ 302 463 59 58 55 87 508 54 472 63 469 419 424 331 337 72
3
+ 899 962 77 1127 62 530 78 880 129 1014 93 148 239 288 357 424
4
+ 2417 2755 254 3886 5336 3655 5798 3273 5016 178 270 6511 223 5391 1342 2377
5
+ 68 3002 3307 166 275 1989 1611 364 157 144 3771 1267 3188 3149 156 3454
6
+ 1088 1261 21 1063 1173 278 1164 207 237 1230 1185 431 232 660 195 1246
7
+ 49 1100 136 1491 647 1486 112 1278 53 1564 1147 1068 809 1638 138 117
8
+ 158 3216 1972 2646 3181 785 2937 365 611 1977 1199 2972 201 2432 186 160
9
+ 244 86 61 38 58 71 243 52 245 264 209 265 308 80 126 129
10
+ 1317 792 74 111 1721 252 1082 1881 1349 94 891 1458 331 1691 89 1724
11
+ 3798 202 3140 3468 1486 2073 3872 3190 3481 3760 2876 182 2772 226 3753 188
12
+ 2272 6876 6759 218 272 4095 4712 6244 4889 2037 234 223 6858 3499 2358 439
13
+ 792 230 886 824 762 895 99 799 94 110 747 635 91 406 89 157
14
+ 2074 237 1668 1961 170 2292 2079 1371 1909 221 2039 1022 193 2195 1395 2123
15
+ 8447 203 1806 6777 278 2850 1232 6369 398 235 212 992 7520 7304 7852 520
16
+ 3928 107 3406 123 2111 2749 223 125 134 146 3875 1357 508 1534 4002 4417
Original file line number Diff line number Diff line change
1
+ 265149
Load Diff Large diffs are not rendered by default.
0 commit comments