I just completed 🐒"Monkey Market" 🍌- Day 22 - Advent of Code 2024 #AdventOfCode https://adventofcode.com/2024/day/22
Here's to an actual good night of sleep. 😴
=> More informations about this toot | More toots from jochie@strangeweb.page
Part 1 was mostly a matter of getting the pseudo random generator right.
For Part 2 I tracked every 4 number sequence and the corresponding value, the first time that sequence was seen for the buyer, and see which sequence had the highest combined value. A bunch of the intermediate values could be optimized away, but helped to keep my head straight and since it only took a few seconds to run... 🤷🏻♂️
https://github.com/jochie/adventofcode/tree/main/2024/22
[#]AdventOfCode #Python #Programming
=> More informations about this toot | More toots from jochie@strangeweb.page This content has been proxied by September (3851b).Proxy Information
text/gemini