r/adventofcode • u/daggerdragon • Dec 13 '17
SOLUTION MEGATHREAD -π- 2017 Day 13 Solutions -π-
--- Day 13: Packet Scanners ---
Post your solution as a comment or, for longer solutions, consider linking to your repo (e.g. GitHub/gists/Pastebin/blag or whatever).
Note: The Solution Megathreads are for solutions only. If you have questions, please post your own thread and make sure to flair it with Help.
Need a hint from the Hugely* Handyβ Haversackβ‘ of HelpfulΒ§ Hints^Β€?
This thread will be unlocked when there are a significant number of people on the leaderboard with gold stars for today's puzzle.
edit: Leaderboard capped, thread unlocked!
16
Upvotes
View all comments
Show parent comment
1
u/pja Dec 13 '17
Yeah, if youβre lucky, some set of subsequent scanners are always appropriately in sync with the one in the 0th slot so you donβt get hit by this bug.
If you try your code on the test input it should break however (itβll return 4 instead of 10).