Follow

Contains the solution to Day 11 of Advent of Code 2022 

I just completed "Monkey in the Middle" - Day 11 - Advent of Code 2022 adventofcode.com/2022/day/11

Right, I knew this would come up eventually... I got close to the answer (like 1 billion too low) by doing operation modulo the test condition of each monkey after the operation, but that didn't work (because the modulo later is wrong for the test of the next monkey). Modular exponentiation for just the "old * old" operation also gave the wrong results.
At this point, I had no clue, so I found a stranger on Reddit with a solution.
How can one find the property that's used here? Modular exponentiation has a Wikipedia page, does this one also? Does it even have a name, or does it just appear somewhere in a text book and you should just know it? Because it was my first time seeing it.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.