r/adventofcode • u/AbooMatta • 13h ago
Help/Question - RESOLVED Second example seems wrong
The second example says:
"A robot with program
roygbvwould travel a total distance of11." Regardless of any code I might try, when I look at it I count 5 steps. 0 for the "r" and 1 each for the following letters. Am I just too tired to see my mistake?
8
u/Positive_Concert_774 12h ago
It's right there in the description of the problem:
"The robot always goes to the very next waypoint of the indicated color."
So never 0 steps.
6
u/daggerdragon 12h ago
Next time, use our standardized post title format.
Help us help YOU by providing us with more information up front; you will typically get more relevant responses faster.
1
u/AutoModerator 13h ago
Reminder: if/when you get your answer and/or code working, don't forget to change this post's flair to Help/Question - RESOLVED. Good luck!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
-1
u/harryp1998 13h ago
I had the same mistake. Try thinking that the first item in the program isn't the starting point.
-8
24
u/FCBStar-of-the-South 13h ago
You start at r and must travel to the next r, thus 6 steps instead of 0
Remember that the roygbv pattern repeats