Skip to content

Commit cc41c88

Browse files
committed
Added day 10 part 1
1 parent d3a688b commit cc41c88

File tree

8 files changed

+24
-1
lines changed

8 files changed

+24
-1
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44

55
// project meta data
66
group 'de.havox_design.aoc2015'
7-
version '0.9.1'
7+
version '0.9.2'
88

99
// Switch to gradle "all" distribution.
1010
wrapper {

day10/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Day 10: Elves Look, Elves Say
2+
Today, the Elves are playing a game called [look-and-say](https://en.wikipedia.org/wiki/Look-and-say_sequence). They
3+
take turns making sequences by reading aloud the previous sequence and using that reading as the next sequence. For
4+
example, `211` is read as "one two, two ones", which becomes `1221` (`1` `2`, `2` `1`s).
5+
6+
Look-and-say sequences are generated iteratively, using the previous value as input for the next step. For each step,
7+
take the previous value, and replace each run of digits (like `111`) with the number of digits (`3`) followed by the
8+
digit itself (`1`).
9+
10+
For example:
11+
* `1` becomes `11` (`1` copy of digit `1`).
12+
* `11` becomes `21` (`2` copies of digit `1`).
13+
* `21` becomes `1211` (one `2` followed by one `1`).
14+
* `1211` becomes `111221` (one `1`, one `2`, and two `1`s).
15+
* `111221` becomes `312211` (three `1`s, two `2`s, and one `1`).
16+
17+
Starting with the digits in your puzzle input, apply this process `40` times. What is **the length of the result**?

day10/src/main/resources/day10.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1113122113
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
11
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
21
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1211
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
111221

0 commit comments

Comments
 (0)