Skip to content

Commit 3daa772

Browse files
committed
Added day 6 part 2
1 parent 66c2418 commit 3daa772

File tree

7 files changed

+19
-0
lines changed

7 files changed

+19
-0
lines changed

day06/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,22 @@ on the ones that were off.
2020
* `turn off 499,499 through 500,500` would turn off (or leave off) the middle four lights.
2121

2222
After following the instructions, **how many lights are lit**?
23+
24+
# Part Two
25+
You just finish implementing your winning light pattern when you realize you mistranslated Santa's message from
26+
Ancient Nordic Elvish.
27+
28+
The light grid you bought actually has individual brightness controls; each light can have a brightness of zero or
29+
more. The lights all start at zero.
30+
31+
The phrase `turn on` actually means that you should increase the brightness of those lights by `1`.
32+
33+
The phrase `turn off` actually means that you should decrease the brightness of those lights by `1`, to a minimum of zero.
34+
35+
The phrase `toggle` actually means that you should increase the brightness of those lights by `2`.
36+
37+
What is the **total brightness** of all lights combined after following Santa's instructions?
38+
39+
For example:
40+
* `turn on 0,0 through 0,0` would increase the total brightness by `1`.
41+
* `toggle 0,0 through 999,999` would increase the total brightness by `2000000`.

day06/src/test/resources/part2sample1.txt

Whitespace-only changes.

day06/src/test/resources/part2sample2.txt

Whitespace-only changes.

day06/src/test/resources/part2sample3.txt

Whitespace-only changes.

day06/src/test/resources/part2sample4.txt

Whitespace-only changes.

day06/src/test/resources/part2sample5.txt

Whitespace-only changes.

day06/src/test/resources/part2sample6.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)