Toot

Written by Jochie 👨🏻‍💻🏳️‍🌈 on 2024-12-22 at 07:26

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 | View the thread | More toots from jochie@strangeweb.page

Mentions

Tags

=> View adventofcode tag | View python tag | View programming tag

Proxy Information
Original URL
gemini://mastogem.picasoft.net/toot/113695287526381069
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
227.220837 milliseconds
Gemini-to-HTML Time
0.43922 milliseconds

This content has been proxied by September (3851b).