Lost 60 minutes due to misinterpreting this in p2: > *whenever* you generate a hash The code initially only did the 2016 stretching for the triplet hash, not the quintet hash. By doing it to both, pt 2 is solved. Not sure the lru cache actually speeds anything up. Many on the subreddit used the approach to generate the quintet first and look backwards 1000 times for a matching quintet (since quintets are more rare than triplets), this will most likely speed things up. Also, this solution do not store the found keys. Many other solutions do, I believe this is some presumptions. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| day_11.py | ||
| day_12.py | ||
| day_13.py | ||
| day_14.py | ||