Advent of Code 2023 - Day 1

preview_player
Показать описание
I placed 29th on part 1 and 3rd on part 2.
Рекомендации по теме
Комментарии
Автор

and the Daily Dose of Imposter syndrome good solve

gala_vs
Автор

"Ok, so what was going on" is now permanently associated with Christmas for me.

huw
Автор

Congrats on the rank. You mitigated a problem many people had with the second part by using startswith. I'm not sure if you are aware, but the written out numbers could have had shared letters like 'eightwo', which had to translate to '82'. That's a pitfall which I (and several other) have fallen into using .replace or re.match approaches.

CantLoseTheBlues
Автор

THAT is VERY impressive, and an awesome understanding and usage of Python! Inspiring. THANK YOU! And FAAASSST!

hstrinzel
Автор

1:05 everyone that knows Python felt that sigh

pipdjs
Автор

Another year, another aoc! Gl with the leaderboard this year! Gotta say, this day took me way too long, on 3 hours of sleep, this is a not-so-straightforward problem haha

Sandborg_
Автор

Hi Jonathan! Great to see you back in action for this year's AOC! I got stuck in the second part because I replaced the number words with their corresponding number. So eightwo became 8wo, which made me loose the 2. Found the bug by running your solution against my input and confronting the results. Found the bug, fixed it and you saved the day ;-) (as usual) You're my AOC Hero 😀

WimvanderHam
Автор

man, that's crazy fast. i guess looking back, my only advice would be instead of turning the line one, two, three into a string, just do a full string and split on ', '
"one, two, three, four, five, six, seven, eight, nine".split(', ') since you copied it.
But you whooped my ass lol. great job
As others have said. starts with was genius and super lucky. i took ages trying to figure out why replacing eight with 8 didnt work. because eightwoneight was an infinite loop that broke if you replaced.

TheSkepticSkwerl
Автор

Mega thanks for this, I was off on a split() route, thank you for this way more elegant. I'd not seen the "for i, c" use before tuple unpacking thank you. I can't quite follow what you've done in part 2, can you point me at an explanation how you've put a list in the enumerate variables? I was thinking of multiple if statements. Oh and apologies I'm a bit delayed with getting to this

brew-j
Автор

thank you ! i had difficulties to understand the first challenge

estelleferre
Автор

Awesome work! Got a new follower here :)

ArtoSantala
Автор

good video
waiting for today's video eagerly

sagar-ttub
Автор

Bro I'm feeling so stupid, I did something similar but janky, it wouldn't give me the right answer then I watched this video and my problem was that I declared the digits array out of the for loop

erickrds
Автор

Can u make a video on setting up a repo for the advent of code?

palgun.
Автор

What did you use to get the problems input so quickly ?

dzykas
Автор

enum is king 😂 greetings from the GoPro side of life.

CrynogarTM
Автор

How do you fetch the data? Because the url is the same for each user but with different values of course.

derEULER
Автор

How would you handle “ten” or “eleven”?
The sample input included “sixteen”, which I think accidentally gets handled because “six” and “sixteen” share the same ending digit once converted.

davidmyers
Автор

I like your code and it gives the right answer, but directions are not fully clear. If Elve was changing digits to words, then in the line 29oneightt first he would replace "one" and the string would equal to 291ightt and the answer would be 21 not 28 as generated by your code. What's your opinion?

ap.pa
Автор

it's almost like getting a good score is luck. it's almost like all of our lives are successful due to luck. life isn't fair. ah well.

TheSkepticSkwerl