LOADING: An error occurred. Update Chrome, try Firefox, or visit this post for more details.

⚠️Reddit changed how removals work, which breaks Reveddit's website. Install the extension to track removed content:Add to chromeAdd to firefoxWhat changed?
✖︎
about reveddit
⚙F.A.Q.add-ons
r/
status
copy sharelink
[+] show filters
78
SOLUTION MEGATHREAD-🎄- 2022 Day 11 Solutions -🎄-(self.adventofcode)
submitted 3 years, 1 month ago* (edited 17 minutes after) by daggerdragon to /r/adventofcode (134.8k)
1036 commentsredditother-discussionssubreddit-indexmessage modsop-focus

WIKI NEWS

  • The FAQ section of the wiki on [Code Formatting](https://www.reddit.com/r/adventofco...

... view full text

since 3 years, 1 month ago
8 of 8

Tip Reveddit Real-Time can notify you when your content is removed.

your account history
(check your username's removed content. why?)
Tip Check if your account has any removed comments.
view my removed comments
you are viewing a single comment's thread.
view all comments
[–][deleted]3 points3 years, 1 month ago
[removed] mod/auto

[removed]

(check your username's removed content. why?)
Restore
(1 users left)
Restore AllHide Unarchived
permalinkhide replies (3)as-ofmessage mods
[–]jdgntr2 points3 years, 1 month ago

It's due to these properties of modulo arithmetic listed here: https://en.wikipedia.org/wiki/Modular_arithmetic#Properties

For all the operations we care about in this problem, op(a) == op(b) (mod n) if a == b (mod n). So as long as we choose an n large enough so that the divisibility check for each monkey can still be performed, we can keep taking the worry levels (mod n) to prevent them from growing too large.

permalinkparentcontexthide replies (1)author-focusas-ofpreserve
[–][deleted]3 points3 years, 1 month ago* (edited 6 months, 2 weeks after)
[deleted] by user
(check your username's removed content. why?)
parenthide replies (1)as-of
[–]sky_badger2 points3 years, 1 month ago

Suppose you only have two monkeys. One has a test of dividing by 13. The other has a test of dividing by 7.

Now suppose you have an ENORMOUS worry number that's slowing down your computer, like 95.

Applying the test for the first monkey gives you the remainder 4: 95 % 13 = 4 For the second monkey it's also 4: 95 % 7 = 4 This suggests 91 is an important number, and 91 = 7 * 13!

So, you can reduce your enormous worry number on either monkey by keeping the remainder after dividing by 91.

For all eight monkeys in the puzzle, you'll see they all have prime divisors, so instead of just 7 * 13, you can reduce your enormous worry numbers in Part 2 by keeping the remainder after dividing by: monkey[0].test * monkey[1].test * monkey[2].test ... etc.

Hope that helps?

permalinkparentcontextauthor-focusas-ofpreserve
[–]daggerdragon1 point3 years, 1 month ago

Comment removed. Top-level comments in Solution Megathreads are for code solutions only.

Create your own individual Help post in /r/adventofcode.

permalinkparentcontextauthor-focusas-ofpreserve
[–]r2d2yo1 point3 years, 1 month ago

Hi. suppose that we want to check if a number is divisible by 4. 5 is not divisible as 1. in other words. if 5 is not divisible then also 1 isn't divisible. so we can check if 1 is divisible insteed of 5, and 5 is just 5-4. we can rest any divisible number and the resultant is as equal divisible as the original. what number can we substract?. the multiplication of all the divisible check numbers is always divisible by all checks. this also is the same as get de modulus

permalinkparentcontextauthor-focusas-ofpreserve
r/revedditremoved.substack.com
🚨 NEWS 🚨
✖︎

Important: Reddit Changed How Removals Work

A recent Reddit update makes mod-removed content disappear from profile pages, which breaks Reveddit's website.

Install the browser extension to receive removal alerts.

Add to chromeAdd to firefox

What changed?

r/revedditremoved.substack.com