You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 02/log.txt
+24-1Lines changed: 24 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -23,4 +23,27 @@ Continuing from "9", you move left, up, right, down, and left, ending with 8.
23
23
Finally, you move up four times (stopping at "2"), then down once, ending with 5.
24
24
So, in this example, the bathroom code is 1985.
25
25
26
-
Your puzzle input is the instructions from the document you found at the front desk. What is the bathroom code?
26
+
Your puzzle input is the instructions from the document you found at the front desk. What is the bathroom code?
27
+
28
+
Your puzzle answer was 47978.
29
+
30
+
The first half of this puzzle is complete! It provides one gold star: *
31
+
32
+
--- Part Two ---
33
+
34
+
You finally arrive at the bathroom (it's a several minute walk from the lobby so visitors can behold the many fancy conference rooms and water coolers on this floor) and go to punch in the code. Much to your bladder's dismay, the keypad is not at all like you imagined it. Instead, you are confronted with the result of hundreds of man-hours of bathroom-keypad-design meetings:
35
+
36
+
1
37
+
2 3 4
38
+
5 6 7 8 9
39
+
A B C
40
+
D
41
+
You still start at "5" and stop when you're at an edge, but given the same instructions as above, the outcome is very different:
42
+
43
+
You start at "5" and don't move at all (up and left are both edges), ending at 5.
44
+
Continuing from "5", you move right twice and down three times (through "6", "7", "B", "D", "D"), ending at D.
45
+
Then, from "D", you move five more times (through "D", "B", "C", "C", "B"), ending at B.
46
+
Finally, after five more moves, you end at 3.
47
+
So, given the actual keypad layout, the code would be 5DB3.
48
+
49
+
Using the same instructions in your puzzle input, what is the correct bathroom code?
0 commit comments