metya 1 mese fa
parent
commit
0df6323a0a
6 ha cambiato i file con 1310 aggiunte e 1 eliminazioni
  1. 2 1
      aoc2025/aocutils.py
  2. 61 0
      aoc2025/day5/README.md
  3. 0 0
      aoc2025/day5/day5.go
  4. 62 0
      aoc2025/day5/day5.py
  5. 11 0
      aoc2025/day5/example.txt
  6. 1174 0
      aoc2025/day5/input.txt

+ 2 - 1
aoc2025/aocutils.py

@@ -46,6 +46,7 @@ def generate_readme(task_dir: str, day: int):
         readme.write(md.markdownify(str(soup.find_all("article")[0])))
     if len(soup.find_all("article")) > 1:
         with open(readme_path, "a") as readme:
+            readme.write("\n\n")
             readme.write(md.markdownify(str(soup.find_all("article")[1])))
 
 
@@ -94,7 +95,7 @@ def bench(part):
 
 
 if __name__ == "__main__":
-    day = 4
+    day = 5
     root = os.path.dirname(__file__)
     task_dir = os.path.join(root, f"day{day}")
     generate_readme(task_dir, day)

+ 61 - 0
aoc2025/day5/README.md

@@ -0,0 +1,61 @@
+--- Day 5: Cafeteria ---
+------------------------
+
+As the forklifts break through the wall, the Elves are delighted to discover that there was a cafeteria on the other side after all.
+
+You can hear a commotion coming from the kitchen. "At this rate, we won't have any time left to put the wreaths up in the dining hall!" Resolute in your quest, you investigate.
+
+"If only we hadn't switched to the new inventory management system right before Christmas!" another Elf exclaims. You ask what's going on.
+
+The Elves in the kitchen explain the situation: because of their complicated new inventory management system, they can't figure out which of their ingredients are *fresh* and which are *spoiled*. When you ask how it works, they give you a copy of their database (your puzzle input).
+
+The database operates on *ingredient IDs*. It consists of a list of *fresh ingredient ID ranges*, a blank line, and a list of *available ingredient IDs*. For example:
+
+```
+3-5
+10-14
+16-20
+12-18
+
+1
+5
+8
+11
+17
+32
+```
+
+The fresh ID ranges are *inclusive*: the range `3-5` means that ingredient IDs `3`, `4`, and `5` are all *fresh*. The ranges can also *overlap*; an ingredient ID is fresh if it is in *any* range.
+
+The Elves are trying to determine which of the *available ingredient IDs* are *fresh*. In this example, this is done as follows:
+
+* Ingredient ID `1` is spoiled because it does not fall into any range.
+* Ingredient ID `5` is *fresh* because it falls into range `3-5`.
+* Ingredient ID `8` is spoiled.
+* Ingredient ID `11` is *fresh* because it falls into range `10-14`.
+* Ingredient ID `17` is *fresh* because it falls into range `16-20` as well as range `12-18`.
+* Ingredient ID `32` is spoiled.
+
+So, in this example, *`3`* of the available ingredient IDs are fresh.
+
+Process the database file from the new inventory management system. *How many of the available ingredient IDs are fresh?*
+
+--- Part Two ---
+----------------
+
+The Elves start bringing their spoiled inventory to the trash chute at the back of the kitchen.
+
+So that they can stop bugging you when they get new inventory, the Elves would like to know *all* of the IDs that the *fresh ingredient ID ranges* consider to be *fresh*. An ingredient ID is still considered fresh if it is in any range.
+
+Now, the second section of the database (the available ingredient IDs) is irrelevant. Here are the fresh ingredient ID ranges from the above example:
+
+```
+3-5
+10-14
+16-20
+12-18
+```
+
+The ingredient IDs that these ranges consider to be fresh are `3`, `4`, `5`, `10`, `11`, `12`, `13`, `14`, `15`, `16`, `17`, `18`, `19`, and `20`. So, in this example, the fresh ingredient ID ranges consider a total of *`14`* ingredient IDs to be fresh.
+
+Process the database file again. *How many ingredient IDs are considered to be fresh according to the fresh ingredient ID ranges?*

+ 0 - 0
aoc2025/day5/day5.go


+ 62 - 0
aoc2025/day5/day5.py

@@ -0,0 +1,62 @@
+import os
+
+with open(os.path.join(os.path.dirname(__file__), "example.txt")) as example:
+    example_data = example.read().splitlines()
+
+with open(os.path.join(os.path.dirname(__file__), "input.txt")) as example:
+    input_data = example.read().splitlines()
+
+
+def parse_data(data):
+    ranges = []
+    ing_ids = []
+    for range in data:
+        if "-" in range:
+            start, end = map(int, range.split("-"))
+            ranges.append((start, end))
+        elif range == "":
+            continue
+        else:
+            ing_ids.append(int(range))
+    return ranges, ing_ids
+
+
+def part1(data):
+    ranges, ing_ids = parse_data(data)
+
+    sum = 0
+    for ing_id in ing_ids:
+        for start, end in ranges:
+            if start <= ing_id <= end:
+                sum += 1
+                break
+
+    print(f"Part 1: {sum=}")
+
+
+def part2(data):
+    ranges, _ = parse_data(data)
+
+    ranges.sort()
+    merged = []
+    current_start, current_end = ranges[0]
+
+    for start, end in ranges[1:]:
+        if start <= current_end:
+            current_end = max(current_end, end)
+        else:
+            merged.append((current_start, current_end))
+            current_start, current_end = start, end
+
+    merged.append((current_start, current_end))
+    sum = 0
+    for start, end in merged:
+        sum += end - start + 1
+
+    print(f"Part 2: {sum=}")
+
+
+part1(example_data)
+part1(input_data)
+part2(example_data)
+part2(input_data)

+ 11 - 0
aoc2025/day5/example.txt

@@ -0,0 +1,11 @@
+3-5
+10-14
+16-20
+12-18
+
+1
+5
+8
+11
+17
+32

+ 1174 - 0
aoc2025/day5/input.txt

@@ -0,0 +1,1174 @@
+154677529022353-159180259958574
+386166873310995-386598196370557
+161698244411647-169426926930313
+101121763798794-101657976665598
+63508818748698-69570783943787
+122914943954449-127879541096298
+292079097438353-297169889716377
+78876406452368-78876406452368
+465692950220528-471121630979966
+555303279293053-558715590710804
+101843544821583-102170118033513
+475335800364972-475864701844976
+528986681002085-531991550698506
+504872706843342-511659259587475
+276606660697857-278216536714875
+555303279293053-555303279293053
+215574095184933-215574095184933
+478308149137049-478863092682069
+427392550891172-429295224972210
+172440028156185-173239294747942
+31760597925371-35599480400364
+178073590207603-178741275129889
+279873460121144-281106311928421
+389764610275749-389854236322225
+24008023057924-29023550782875
+384549590453124-384872524594828
+317542057622042-319707076298123
+5607879354923-7661836157786
+315130405003905-317111071237234
+286958632399522-289398635031451
+493274792872620-501596871824540
+108744216333371-109533098291038
+516973121584400-521680910355223
+447929975085174-447929975085174
+304877710362085-307607215356244
+107160024771639-107965377719193
+41688179062545-46727831458780
+3849795079523-6530118419360
+391017741943844-391154542140980
+313579906903717-315600719698994
+485784878744900-485784878744900
+111291499899107-118577868920367
+235208417105683-240430767858180
+394259834106646-401055130060392
+456054571389747-458379854336493
+102860695710767-103706888496117
+96926039937940-96926039937940
+263384080655989-269003708106234
+479895611998397-480103433990608
+496328748753869-501596871824540
+215574095184933-216720844318814
+277573483639649-279143594186893
+41688179062545-46727831458780
+193230462953750-197634156093799
+390482503094640-391017741943844
+24008023057924-24008023057924
+549040443517133-549040443517133
+464049531839818-467750968793462
+333957996674519-340355136786488
+174316442827373-174507007823484
+278559446882925-280417473715294
+386166873310995-386808460030271
+92286079531388-96926039937939
+178613256623611-178985511422801
+203283649847218-206595097364253
+54761303430805-58534358577927
+73759737310649-78876406452368
+322326144863389-330574661461968
+389191548439983-389438481588478
+477054113872452-477919175677081
+274544699118756-276013310956138
+389764610275749-389854236322225
+473157872563491-473573524695353
+347243281309840-351461744364488
+61896995802329-65632814028272
+104996729143096-105478280127857
+533788408501571-542183202325067
+292096385653-2895664415878
+174507007823484-174818599526046
+105093687145928-105478280127857
+485784878744901-492048425818937
+533788408501571-542183202325067
+414279036862342-421586481368401
+1925839049764-4647860531016
+426284338695339-428286956145932
+12534166247627-14845453648486
+355350505502445-355350505502445
+383916552424675-384549590453124
+302787536534541-310704339291453
+235208417105683-240430767858180
+284134656992005-289398635031451
+382586656169978-383156827852609
+102684994508816-103436950891946
+176279471067887-176590777002744
+403682733946811-408061910172474
+81390076677485-84906945855948
+173730424683210-174507007823484
+176839843141038-177495818429289
+269003708106235-269003708106235
+100749465673773-101468584186889
+84906945855949-87470249967947
+271556956444208-273152477438099
+479895611998397-480632969238475
+389854236322225-390607310331474
+103436950891946-103859188170711
+204675987781839-210843551845556
+275849707806396-277078073569951
+101657976665598-102170118033513
+135633768360542-137858828907117
+174014614705001-174507007823484
+225254182191392-228377906962602
+383309777106172-384231162025852
+105093687145928-105696443509777
+107784880985805-108346965242706
+105478280127857-106082907697307
+475864701844976-476402660690655
+252561384657320-258938110122105
+225254182191391-225254182191391
+131161210518147-137858828907117
+422603175583294-424432940373045
+478863092682069-479234503506978
+453733019286017-461962964560894
+257565246710462-258938110122105
+273648654655936-275245006516684
+363452839849348-367811264969362
+367811264969363-370912596391714
+272687163335124-274281232735377
+122914943954448-122914943954448
+12534166247627-17978641043697
+114131909168856-116863360548693
+386166873310995-386808460030271
+523450362347017-528986681002084
+434333545201546-436459966374149
+151811631262405-154677529022351
+391154542140980-391625167471790
+430284130324083-432063088183303
+515610449866074-516973121584398
+178985511422801-179883363987561
+425190369713651-426923037807194
+423592177064739-425498497189226
+387949453268898-388083781327727
+109533098291038-110150917725504
+344356298902220-347243281309838
+446815656957217-447929975085173
+474028107778857-474951584609464
+319218207908204-321067184438415
+35599480400366-39189386212073
+141167905557790-148672751692345
+408061910172474-408061910172474
+316288152802203-318212415467279
+171863310305907-172440028156185
+428561089219196-430660361790221
+244988061715536-250524701606481
+376296841208360-380586384164273
+141167905557790-145386815984773
+175635694610677-176141441562130
+6883081997903-9367088778774
+294992887690312-300811119440536
+103859188170711-104726210594362
+171863310305907-172066626751164
+434333545201546-441021712909874
+355350505502445-359335051090460
+312146712630264-314213792909594
+183240997215240-189938918689442
+477054113872452-477365727973554
+421586481368402-421586481368402
+243391641653162-244988061715535
+376296841208359-376296841208359
+197634156093799-197634156093799
+165516709125156-166403473587888
+546021835456331-549040443517133
+394259834106646-401055130060392
+333957996674519-335802795963450
+
+410253761898486
+549863259451272
+498921581342817
+49604820785631
+286235305824669
+419767090604304
+526329303700889
+275363385868486
+190628908045772
+556623628952898
+491289867156953
+475055852566485
+431608438710425
+184000123954157
+555019499361976
+436527567379019
+470586448934639
+531557333773521
+557211714318949
+334177008279349
+263539247686439
+254687902654637
+486733553004834
+3373232547080
+312262072615603
+484997464805004
+101707896203057
+95318424107256
+498617049751376
+418689051361758
+141253167782654
+287260432776170
+191501818124849
+530375209971244
+1981022850565
+443111996786710
+463359004695930
+318858719773638
+365170348884244
+268483106914978
+181649093591169
+114445426995217
+521229515545736
+179324378430481
+249464049936774
+486192438033417
+298451698282399
+228274898161974
+266946839358816
+32631786254777
+304490565306838
+107752901589429
+375922534367550
+517419081085174
+431126846222569
+325755198767299
+263149216173154
+175856591620621
+24672456542758
+363792408925966
+524809135577635
+41646715262823
+226574277697957
+32839242821656
+230597017156484
+376902247786582
+427900410663888
+345364782826392
+398829784143741
+434369061734272
+238589781480393
+314319040276615
+180358896712774
+185706427306381
+69826043445386
+245492379950943
+70920210708273
+153712785137764
+536219303908124
+20911870880812
+147754861114152
+309389556649765
+154677274966020
+534551804833991
+517823545721044
+275605410308351
+252779453177021
+330802496712678
+274718014293319
+152075473537102
+327561161226987
+250144998080492
+556154992308316
+246341926691197
+7137564618262
+84959050216449
+302755646641223
+423931913866255
+335393944520418
+157238260464707
+252516399918683
+516204842931453
+454713400099763
+266836914527235
+127678771208094
+107447789078664
+433221527209055
+42433683316850
+476668587820742
+289191936010917
+496292912552307
+6087815081433
+517658210290942
+315176670417196
+498825971939670
+378336961133404
+275454079647581
+264611937762188
+476537947426373
+55101928535081
+443555845029200
+36364544279250
+396807761289490
+15657651608424
+113369593349469
+84812871401330
+260245127961805
+286345194517242
+355990617743813
+67619287476060
+326879670434233
+157688488625075
+424685180330894
+67633202857880
+275890438842922
+454927155838999
+65217822157010
+80437637001838
+258743096245887
+298729279481134
+74331728957878
+354202635738005
+81566383821542
+426827942754812
+339505580866170
+16712262660800
+338649967793179
+274585825636815
+382485906346400
+189014260824468
+417846193546507
+131664247823328
+497453736927896
+335523817866945
+411934182497681
+429344650013087
+33214991359936
+126420960361094
+249989415795279
+294024847085683
+32717531450394
+272006505587847
+357533666148679
+121851071295107
+366562308154558
+335778410499204
+486490112924293
+305377073189894
+388162186983716
+292493681093201
+343991721420976
+539013990454914
+206839597762236
+256447210335672
+414091406571761
+192109298965535
+556487886595901
+152477912112940
+474926368429038
+335730049984193
+81992637605545
+383754126814600
+260850485197880
+186831951337196
+23843198993605
+396880518103757
+275814921391595
+340782346109705
+253735847723103
+399997156154682
+322834603936121
+548413555560655
+292244860452649
+447712191063807
+434187641782124
+518968133412183
+142258077406995
+164201847829494
+511636752867155
+101336243678249
+370001532136161
+235703557018293
+389402859742439
+347199396335252
+460387262574619
+117350075314569
+9092842732494
+27684362250040
+170621257615976
+489007595574604
+300107454337081
+238672333814058
+5407212065799
+168555923517250
+362296193066872
+65686742129337
+495382110357267
+96586436714482
+188662999631265
+304194662947185
+468195876410706
+378288113312510
+530454552431473
+127237761050025
+357900171275514
+471527832558378
+494540009134580
+397518033798034
+364601226671749
+457642235079765
+191310593891078
+86650775559820
+531990992854133
+197191989400211
+486252576821860
+8794928155453
+454764622532767
+414611693642461
+527146090908463
+76618295376261
+465913447186808
+439641040664708
+6535370334785
+355210991729118
+9160727124459
+43046853781620
+96151712362558
+83638079685099
+30653631669971
+467142154553781
+423004640304898
+284641998253824
+194684518383609
+309571992806486
+179408694425062
+309864896574521
+204176591479276
+258307097733663
+217552625240947
+347423326493152
+166405598259103
+551014555278433
+274650147766512
+266462991176202
+116330623696615
+449294547093667
+390959930434274
+257348871206988
+150921188161508
+455697864731274
+170725890278486
+267548851843341
+324215402462190
+132757876935287
+152458505646717
+74127396614206
+11590080829115
+101611040889219
+42369058080016
+499788498958935
+187679957880710
+46022732923038
+250660500211227
+348285761007580
+431759638215276
+165768589383019
+103141501929494
+391707632366687
+9386403793581
+122272449246823
+206110297441523
+405346097838669
+258509090766753
+11895251091756
+165866865092714
+104071706610324
+203239875766122
+328726176963789
+496111844356527
+553452079290381
+209585139058434
+273342086115607
+253627914794941
+272934831357574
+133403937979599
+76280535434863
+347509194040325
+513016627101558
+50123286990482
+313743662012959
+236203399774928
+407126597432690
+539426876284915
+487794519697151
+360797173937821
+76632085414120
+499497893551833
+45159767611876
+142989265911842
+452713499733645
+168770978274073
+108424302842784
+551887017787602
+5360866827270
+415489820959277
+334052838819562
+66287931514206
+240550855914376
+313229074130792
+247328062959288
+15106777529401
+413127557962848
+85963765505116
+189061543339283
+212900349041597
+335824746650285
+179752337285565
+497156008105503
+130920381773559
+223378690899270
+303694228221795
+49446114936801
+496198681778647
+536377988454763
+115180054073801
+477918187816633
+484590971073906
+63008456143552
+84657775927190
+267031843271673
+231602115518861
+477545575366443
+86694410272535
+460923672543803
+302262251173993
+508167214216821
+545976160390671
+55656542694700
+292168623871101
+230909351934483
+475595633555098
+142676114764659
+265986997849334
+299501841263616
+376943786872520
+286002939680418
+89999906454650
+313322165405932
+309003782277290
+140750101218322
+152202495424688
+378122396213029
+186985886585443
+13754956360946
+439505809346351
+529722334524417
+344410885384810
+84444555113816
+473463755300325
+9112806636329
+294557244099924
+517819150342313
+180183398514006
+254704202476919
+299096470651149
+557238981950951
+418404451683584
+95029878781305
+461002978526829
+446296043675336
+143136140625925
+451168878728942
+531919025935504
+525254610801155
+170613178849469
+380103250604311
+164632157587342
+439462360053479
+288267320628791
+127982729620522
+462259912885837
+202853038640309
+18875001785971
+322902364782054
+438205212514987
+438358737418664
+506474377024178
+176531283522134
+315105217311225
+1114796966590
+529402453118550
+131272468591964
+467104527321249
+56270364426579
+104307932957439
+186955156977034
+264273718935522
+430317314594097
+193768661584518
+486438868549726
+460600365184424
+322829772517487
+106132182421623
+397241411765768
+514044295774705
+246166092846517
+154334784953869
+228088294659575
+419763065325210
+353460331420040
+486272675206961
+110130985545955
+7736910584650
+412799725086006
+498781798567685
+339308435598599
+141869490660628
+300133565820631
+83966416617940
+318783296913018
+278538093459244
+337664963050208
+13790801642290
+158054621490827
+233656176293692
+216121847416099
+241604385913008
+126127892062900
+69643223808312
+281476594405712
+289332290277810
+479781433810441
+376679088083523
+238989434324350
+75195352443596
+174455227009939
+16029438887366
+505538132202642
+132724197837969
+3727236366366
+439093224605239
+141593697623391
+415679325017009
+196568627597701
+227080533395879
+379843363230096
+46535489484672
+36186746122159
+64728646545046
+253116248282014
+86419566815006
+166409411930757
+157448376637837
+77453922740089
+112491873687683
+277855952055812
+185955936628423
+474737794418604
+511342858348726
+256177956109142
+322085052507668
+526338137902498
+469578358803811
+162086376253140
+360304157658436
+521045058474586
+129656915006523
+461725920895930
+509223404435948
+103658290354436
+428135587096764
+380392886744181
+390848313535457
+299712045737361
+275257390057569
+529908950100821
+379366388711385
+128567157695172
+151849391897884
+8576036457916
+258536014635363
+379154177939001
+515611105553170
+253594186704995
+216008788768251
+188734895891826
+233513332711327
+91794953083627
+193996683229468
+492378569432156
+496111979011643
+166748466845701
+356498520136375
+522709417613630
+133721596988264
+505944459075471
+92131547257036
+83188029752398
+23882354338664
+454116730499489
+557253663186417
+519946693605280
+203867975173317
+205411400401159
+65881251359424
+343732532648765
+518704776264238
+468029066871163
+280626750223925
+264146962353407
+452961720174981
+476364876297979
+555991530522504
+332614474150893
+196202292344328
+535574309989246
+278891887458936
+225651992738649
+118011622294764
+363358992206443
+185159587976272
+396953764653018
+102819884285777
+343122407852518
+61471797071602
+17027519059786
+226657358206053
+357968268816433
+238166032557771
+312678619291319
+539018701583233
+81879503761879
+278002516553332
+250382325173923
+116873123274690
+322786116106376
+368206596311443
+530019092408397
+441900704325295
+428115041593196
+257951727858224
+470951597517597
+417821172055489
+561923512639131
+204411141171817
+377950981540149
+94473808526069
+122135874590353
+253393731557179
+505913318397913
+4095027618493
+301261188503973
+165589858050476
+215696404979940
+115573840999621
+415460940243982
+147851062332027
+73621416993663
+499427325831324
+509818422599095
+439309705117057
+530862034989047
+163313760893821
+461700591162487
+162125373463010
+310221324281908
+305074928832545
+324100865901678
+327674101448709
+524560594336855
+345591074955450
+284331651858629
+463585356329592
+45370076862786
+439758335426601
+451826447836313
+421080562290622
+475161864880959
+138389832614336
+180748148376680
+408744063928856
+166693161468111
+37850302723189
+238165781789213
+52098157901012
+182320212927662
+141005466288138
+464344005303325
+516647478546908
+192204610850580
+75595856941206
+523865569691286
+350501474694432
+252621524982246
+405216556065812
+165570422743295
+289672496165671
+70772756279052
+105115094653216
+405790625266241
+553974740609977
+207748317690366
+44277988818371
+395081153522314
+189840780462336
+339967690502742
+431670871759336
+21829032365086
+48271254834501
+161342455449668
+131069727655042
+394608198731018
+348288514074676
+383597794987353
+196311147269168
+230491609996823
+261730147463066
+94222711643946
+469658629037207
+554577575180967
+168651622300780
+310376484656070
+27218642456293
+510091625397765
+441540646107836
+413456963590371
+519096300247087
+82299925712321
+15609402580794
+83801975165919
+143670035165559
+331399879655678
+109790058569053
+64844602826218
+192512049918048
+157770703843879
+169321756479039
+206874515387697
+96023351381369
+1827878355331
+290460801494818
+146310950311262
+157798302976448
+141598657412741
+420664054454923
+464340300845877
+159692174898104
+384314861816919
+515230006659768
+434337816009387
+68362067235196
+490178099119247
+325770400335780
+474101872750512
+490591928337250
+137768450110338
+229928025963659
+35551328560498
+252401702993163
+556733590545375
+24671316177382
+107048893257432
+123111332491420
+335528875232707
+160748075769370
+38444314977324
+534393408113612
+507474638349376
+417028608594211
+113890930987674
+117581109054186
+498222310803045
+113912096699997
+165662592980384
+273376506783329
+17683185049200
+102192705119874
+4614301297991
+257696675270271
+91130205573324
+509384333162878
+162183896925095
+317975733604983
+223277406182705
+383384524300181
+264481672453096
+306557168530199
+155236621271510
+92804253518402
+42124891411586
+215766223060228
+461423601330326
+440935598732928
+162182545358086
+258626558395426
+55163807273056
+273750643462657
+39214488341205
+279284135313742
+497708456479741
+519605122484979
+483770200343433
+508288558793427
+421809913184383
+490472418638553
+169015095139130
+467492463083685
+64514328365345
+164528799905876
+265127615401522
+458524709805071
+34603890057950
+145996019976160
+107847744075543
+341715926547902
+199054216854960
+424949391182552
+437426701677171
+24167070051567
+425516420138181
+129035169021306
+305734668602615
+405674921677946
+352503574500445
+302488029495391
+120942031220459
+168656475431648
+454959324466248
+464762536582501
+267009323788520
+427589466371297
+548546261776406
+443161554431309
+377486827993140
+418321792626107
+291967424383811
+177039953300034
+523498787487719
+83460030689897
+510332636410611
+336747078844531
+210600656206006
+445721275267365
+466784150838051
+145547559029469
+91812974668220
+124096807777931
+490211795346461
+527436620686178
+246613023256053
+171584735653819
+48483377717209
+75756336643751
+286013706905268
+360619484669046
+152810125388568
+150444984556074
+363366384971596
+162313705476063
+538912473859259
+253496447434605
+377252309872961
+356494177450654
+325306757806031
+80883044447728
+527407557580082
+200262711050502
+434313385713101
+466430536242783
+255919141059367
+18451069481497
+499213075982247
+486607116805406
+30818103104947
+143632950074659
+58458428082259
+125386325459066
+12714439004936
+303483401177088
+211874139606663
+411386020482822
+480147424523836
+77063647903314
+178922900988862
+179208622633357
+18352268254520
+64036671086323
+178091057895679
+417718471473380
+137403706581273
+385919717017803
+355110139600097
+327643284128884
+509266667163201
+194577934558030
+491495051433064
+224539757854520
+498222235151773
+113384271278078
+5314995906673
+202953315220252
+560677355044033
+130440142737921
+530843925649231
+3031504486722
+273710290974488
+315324320636825
+87342747617993
+72173245597132
+124550644770308
+348557638061821
+200548681308406
+427070109636461
+38339569402896
+41725865041104
+406998124567735
+524883225690543
+78139572546171
+395769799373295
+421828435220529
+116306610857451
+11018068752348
+126373446167530
+230260867169526
+438300569660058
+324786936693001
+313083108403591
+500456101526696
+312903457036757
+380936907399508
+40251387904941
+255798902670135
+66467961499202
+265315833184954
+264785691977238
+465027481313734
+474870738350672
+56521786715450
+179261539250724
+522599978339269
+3655228038714
+547000482778292
+245703885559858
+52661923405860
+397292256648534
+258308595264506
+394722459571130
+498443869647440
+303100491436550
+179585188469802
+440723234002589
+93743371177258
+143048937912920
+470122379500730
+304499475538313
+468856020369222
+254462035627375
+344745244838323
+460249959464057
+473211566654433
+114043743241134
+50734813345635
+534724865626010
+22568474283537
+79001192367655
+364610849696358
+417126494749326
+99126807190551
+87004692967758
+428829711627085
+382950610152557
+98046038719086
+203864832161201
+172302531992785
+554633601659619
+172128380896529
+491557377100581
+524773294963448
+162000337488312
+4994398729825
+397263291508098
+372449214406817
+426177221247475
+378420888072049
+379683975273362
+152806178174211
+47063616606949
+295780174948414
+330889160676385
+299456479201968
+548956456823739
+64571400874532
+45870997358430
+303079347367340
+138576112560692
+21396971131171
+5109621767715
+559036938567247
+417630154898952
+498181358730639
+423896628390842
+272942964127694
+120324472583849
+376187228395925
+152884014921657
+77774749902060
+317771621484122
+165049382702159
+105786976713119
+144853297813405
+523219559493423
+507919400436643
+286814731281141
+189509314085667
+539308189471828
+541762857977435
+521780685660356
+101428919695755
+377134024143601
+342160541753814
+158473130893305
+427585804115866
+31405498956245
+160133106622170
+444640244088845
+418039655877050
+489688778229768
+446241566305615
+380846824094839
+319341882536123
+527650243341968
+370179647605325
+122284696765322
+303891773086286
+324558535275676
+472422983158480
+77482921168075
+357225675282842
+28554026970448
+422939803616266
+45203918065472
+179966529847816
+304300799151122
+243995099253546
+348127098309550
+162800610907778
+337955656863303
+136888193390528
+397097717726308
+535308000456709
+318742690804496
+146103913920548
+499544324541209
+271354087486898
+33611100324721
+330574159926459
+395869456900413
+115959115973721
+268761302564529
+115773217398633
+142145641025184
+374870492525079
+378054484899991
+474271366639256
+517890798971084
+526145560280483
+507554140954150
+284912137753201
+371017243622177
+370792436195561
+553131660190976
+76121677321255
+484721822888542
+258003770495157
+9393288258784
+146721518959612
+166534916246837
+476711946108411
+421865029545437
+393593619753186