Day 17 #adventofcode in the books.
Part 1 was to create a virtual machine to execute a given program and get back a list of numbers. Simple.
Part 2 was to reverse it and from a given list, get the initial value number.
I decompiled the program and figured out a reasonable starting point for brute force forward attempts. However I realized this was futile, even knowing a decent start point there were way too many combinations.
Went back to the drawing board and hit on the idea of working backwards on each digit (the next step on each was a power of 8 higher). Worked for the short test code. Failed for the real one.
Tried many variations. Came back to it this morning and coverted it to #python as a I suspected the numbers might be getting large. That worked. The factors had gotten beyond the max safe int in #typescript
=> More informations about this toot | View the thread | More toots from walkerb@infosec.exchange
=> View adventofcode tag | View python tag | View typescript tag This content has been proxied by September (ba2dc).Proxy Information
text/gemini