1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
--- Day 1: Chronal Calibration ---
"We've detected some temporal anomalies," one of Santa's Elves at the Temporal Anomaly Research and
Detection Instrument Station tells you. She sounded pretty worried when she called you down here.
"At 500-year intervals into the past, someone has been changing Santa's history!"
"The good news is that the changes won't propagate to our time stream for another 25 days, and we
have a device" - she attaches something to your wrist - "that will let you fix the changes with no
such propagation delay. It's configured to send you 500 years further into the past every few days;
that was the best we could do on such short notice."
"The bad news is that we are detecting roughly [1m[97mfifty[0m anomalies throughout time; the device will
indicate fixed anomalies with [1m[33mstars[0m. The other bad news is that we only have one device and you're
the best person for the job! Good lu--" She taps a button on the device and you suddenly feel like
you're falling. To save Christmas, you need to get all [1m[33mfifty stars[0m by December 25th.
Collect stars by solving puzzles. Two puzzles will be made available on each day in the Advent
calendar; the second puzzle is unlocked when you complete the first. Each puzzle grants
[1m[33mone star[0m. Good luck!
After feeling like you've been falling for a few minutes, you look at the device's tiny screen.
"Error: Device must be calibrated before first use. Frequency drift detected. Cannot maintain
destination lock." Below the message, the device shows a sequence of changes in frequency (your
puzzle input). A value like +6 means the current frequency increases by 6; a value like -3 means the
current frequency decreases by 3.
For example, if the device displays frequency changes of +1, -2, +3, +1, then starting from a
frequency of zero, the following changes would occur:
- Current frequency 0, change of +1; resulting frequency 1.
- Current frequency 1, change of -2; resulting frequency -1.
- Current frequency -1, change of +3; resulting frequency 2.
- Current frequency 2, change of +1; resulting frequency 3.
In this example, the resulting frequency is 3.
Here are other example situations:
- +1, +1, +1 results in 3
- +1, +1, -2 results in 0
- -1, -2, -3 results in -6
Starting with a frequency of zero, [1m[97mwhat is the resulting frequency[0m after all of the changes in
frequency have been applied?
|