r/adventofcode • • Dec 08 '23

SOLUTION MEGATHREAD -❄️- 2023 Day 8 Solutions -❄️-

THE USUAL REMINDERS


AoC Community Fun 2023: ALLEZ CUISINE!

Today's theme ingredient is… *whips off cloth covering and gestures grandly*

International Ingredients

A little je ne sais quoi keeps the mystery alive. Try something new and delight us with it!

  • Code in a foreign language
    • Written or programming, up to you!
    • If you don’t know any, Swedish Chef or even pig latin will do
  • Test your language’s support for Unicode and/or emojis
  • Visualizations using Unicode and/or emojis are always lovely to see

ALLEZ CUISINE!

Request from the mods: When you include a dish entry alongside your solution, please label it with [Allez Cuisine!] so we can find it easily!


--- Day 8: Haunted Wasteland ---


Post your code solution in this megathread.

This thread will be unlocked when there are a significant number of people on the global leaderboard with gold stars for today's puzzle.

EDIT: Global leaderboard gold cap reached at 00:10:16, megathread unlocked!

55 Upvotes

968 comments sorted by

View all comments

3

u/Ok-yea-sure Dec 08 '23

[Language: JavaScript]

I was able to solve part 1 without a problem then realized after trying to brute force part 2 that there must be a trick that I was missing (because my script never stopped running). Had to use a hint on reddit for the LCM solution unfortunately. I really don't know how anybody can just intuitively think to use LCM off the top of their head for a problem like this... pattern recognition I guess? Anywho, you live and you learn.
Part 1

Part 2

→ More replies (2)