2 Now, you need to figure out how to pilot this thing.
4 It seems like the submarine can take a series of commands like forward 1, down 2, or up 3:
6 forward X increases the horizontal position by X units.
7 down X increases the depth by X units.
8 up X decreases the depth by X units.
9 Note that since you're on a submarine, down and up affect your depth, and so they have the opposite result of what you might expect.
11 The submarine seems to already have a planned course (your puzzle input). You should probably figure out where it's going. For example:
19 Your horizontal position and depth both start at 0. The steps above would then modify them as follows:
21 forward 5 adds 5 to your horizontal position, a total of 5.
22 down 5 adds 5 to your depth, resulting in a value of 5.
23 forward 8 adds 8 to your horizontal position, a total of 13.
24 up 3 decreases your depth by 3, resulting in a value of 2.
25 down 8 adds 8 to your depth, resulting in a value of 10.
26 forward 2 adds 2 to your horizontal position, a total of 15.
27 After following these instructions, you would have a horizontal position of 15 and a depth of 10. (Multiplying these together produces 150.)
29 Calculate the horizontal position and depth you would have after following the planned course. What do you get if you multiply your final horizontal position by your final depth?
31 Your puzzle answer was 2272262.
34 Based on your calculations, the planned course doesn't seem to make any sense. You find the submarine manual and discover that the process is actually slightly more complicated.
36 In addition to horizontal position and depth, you'll also need to track a third value, aim, which also starts at 0. The commands also mean something entirely different than you first thought:
38 down X increases your aim by X units.
39 up X decreases your aim by X units.
40 forward X does two things:
41 It increases your horizontal position by X units.
42 It increases your depth by your aim multiplied by X.
43 Again note that since you're on a submarine, down and up do the opposite of what you might expect: "down" means aiming in the positive direction.
45 Now, the above example does something different:
47 forward 5 adds 5 to your horizontal position, a total of 5. Because your aim is 0, your depth does not change.
48 down 5 adds 5 to your aim, resulting in a value of 5.
49 forward 8 adds 8 to your horizontal position, a total of 13. Because your aim is 5, your depth increases by 8*5=40.
50 up 3 decreases your aim by 3, resulting in a value of 2.
51 down 8 adds 8 to your aim, resulting in a value of 10.
52 forward 2 adds 2 to your horizontal position, a total of 15. Because your aim is 10, your depth increases by 2*10=20 to a total of 60.
53 After following these new instructions, you would have a horizontal position of 15 and a depth of 60. (Multiplying these produces 900.)
55 Using this new interpretation of the commands, calculate the horizontal position and depth you would have after following the planned course. What do you get if you multiply your final horizontal position by your final depth?
57 Your puzzle answer was 2134882034.
59 Both parts of this puzzle are complete! They provide two gold stars: **
61 At this point, you should return to your Advent calendar and try another puzzle.
63 If you still want to see it, you can get your puzzle input.
65 You can also [Share] this puzzle.--- Day 2: Dive! ---
66 Now, you need to figure out how to pilot this thing.
68 It seems like the submarine can take a series of commands like forward 1, down 2, or up 3:
70 forward X increases the horizontal position by X units.
71 down X increases the depth by X units.
72 up X decreases the depth by X units.
73 Note that since you're on a submarine, down and up affect your depth, and so they have the opposite result of what you might expect.
75 The submarine seems to already have a planned course (your puzzle input). You should probably figure out where it's going. For example:
83 Your horizontal position and depth both start at 0. The steps above would then modify them as follows:
85 forward 5 adds 5 to your horizontal position, a total of 5.
86 down 5 adds 5 to your depth, resulting in a value of 5.
87 forward 8 adds 8 to your horizontal position, a total of 13.
88 up 3 decreases your depth by 3, resulting in a value of 2.
89 down 8 adds 8 to your depth, resulting in a value of 10.
90 forward 2 adds 2 to your horizontal position, a total of 15.
91 After following these instructions, you would have a horizontal position of 15 and a depth of 10. (Multiplying these together produces 150.)
93 Calculate the horizontal position and depth you would have after following the planned course. What do you get if you multiply your final horizontal position by your final depth?
95 Your puzzle answer was 2272262.
98 Based on your calculations, the planned course doesn't seem to make any sense. You find the submarine manual and discover that the process is actually slightly more complicated.
100 In addition to horizontal position and depth, you'll also need to track a third value, aim, which also starts at 0. The commands also mean something entirely different than you first thought:
102 down X increases your aim by X units.
103 up X decreases your aim by X units.
104 forward X does two things:
105 It increases your horizontal position by X units.
106 It increases your depth by your aim multiplied by X.
107 Again note that since you're on a submarine, down and up do the opposite of what you might expect: "down" means aiming in the positive direction.
109 Now, the above example does something different:
111 forward 5 adds 5 to your horizontal position, a total of 5. Because your aim is 0, your depth does not change.
112 down 5 adds 5 to your aim, resulting in a value of 5.
113 forward 8 adds 8 to your horizontal position, a total of 13. Because your aim is 5, your depth increases by 8*5=40.
114 up 3 decreases your aim by 3, resulting in a value of 2.
115 down 8 adds 8 to your aim, resulting in a value of 10.
116 forward 2 adds 2 to your horizontal position, a total of 15. Because your aim is 10, your depth increases by 2*10=20 to a total of 60.
117 After following these new instructions, you would have a horizontal position of 15 and a depth of 60. (Multiplying these produces 900.)
119 Using this new interpretation of the commands, calculate the horizontal position and depth you would have after following the planned course. What do you get if you multiply your final horizontal position by your final depth?
121 Your puzzle answer was 2134882034.
123 Both parts of this puzzle are complete! They provide two gold stars: **
125 At this point, you should return to your Advent calendar and try another puzzle.
127 If you still want to see it, you can get your puzzle input.
129 You can also [Share] this puzzle.--- Day 2: Dive! ---
130 Now, you need to figure out how to pilot this thing.
132 It seems like the submarine can take a series of commands like forward 1, down 2, or up 3:
134 forward X increases the horizontal position by X units.
135 down X increases the depth by X units.
136 up X decreases the depth by X units.
137 Note that since you're on a submarine, down and up affect your depth, and so they have the opposite result of what you might expect.
139 The submarine seems to already have a planned course (your puzzle input). You should probably figure out where it's going. For example:
147 Your horizontal position and depth both start at 0. The steps above would then modify them as follows:
149 forward 5 adds 5 to your horizontal position, a total of 5.
150 down 5 adds 5 to your depth, resulting in a value of 5.
151 forward 8 adds 8 to your horizontal position, a total of 13.
152 up 3 decreases your depth by 3, resulting in a value of 2.
153 down 8 adds 8 to your depth, resulting in a value of 10.
154 forward 2 adds 2 to your horizontal position, a total of 15.
155 After following these instructions, you would have a horizontal position of 15 and a depth of 10. (Multiplying these together produces 150.)
157 Calculate the horizontal position and depth you would have after following the planned course. What do you get if you multiply your final horizontal position by your final depth?
159 Your puzzle answer was 2272262.
162 Based on your calculations, the planned course doesn't seem to make any sense. You find the submarine manual and discover that the process is actually slightly more complicated.
164 In addition to horizontal position and depth, you'll also need to track a third value, aim, which also starts at 0. The commands also mean something entirely different than you first thought:
166 down X increases your aim by X units.
167 up X decreases your aim by X units.
168 forward X does two things:
169 It increases your horizontal position by X units.
170 It increases your depth by your aim multiplied by X.
171 Again note that since you're on a submarine, down and up do the opposite of what you might expect: "down" means aiming in the positive direction.
173 Now, the above example does something different:
175 forward 5 adds 5 to your horizontal position, a total of 5. Because your aim is 0, your depth does not change.
176 down 5 adds 5 to your aim, resulting in a value of 5.
177 forward 8 adds 8 to your horizontal position, a total of 13. Because your aim is 5, your depth increases by 8*5=40.
178 up 3 decreases your aim by 3, resulting in a value of 2.
179 down 8 adds 8 to your aim, resulting in a value of 10.
180 forward 2 adds 2 to your horizontal position, a total of 15. Because your aim is 10, your depth increases by 2*10=20 to a total of 60.
181 After following these new instructions, you would have a horizontal position of 15 and a depth of 60. (Multiplying these produces 900.)
183 Using this new interpretation of the commands, calculate the horizontal position and depth you would have after following the planned course. What do you get if you multiply your final horizontal position by your final depth?
185 Your puzzle answer was 2134882034.
187 Both parts of this puzzle are complete! They provide two gold stars: **
189 At this point, you should return to your Advent calendar and try another puzzle.
191 If you still want to see it, you can get your puzzle input.
193 You can also [Share] this puzzle.