diff --git a/rust/input/day_10.txt b/rust/input/day_10.txt
new file mode 100644
index 0000000..89172ea
--- /dev/null
+++ b/rust/input/day_10.txt
@@ -0,0 +1 @@
+1113122113
\ No newline at end of file
diff --git a/rust/src/day_10.rs b/rust/src/day_10.rs
new file mode 100644
index 0000000..f7b527a
--- /dev/null
+++ b/rust/src/day_10.rs
@@ -0,0 +1,59 @@
+#[test]
+fn test_day_10() {
+ let mut foo = LookAndSay { seq: vec![2, 1, 1] };
+ assert_eq!(vec![1, 2, 2, 1], foo.next().unwrap());
+
+ foo = LookAndSay { seq: vec![1] };
+ assert_eq!(vec![1, 1], foo.next().unwrap());
+ assert_eq!(vec![2, 1], foo.next().unwrap());
+ assert_eq!(vec![1, 2, 1, 1], foo.next().unwrap());
+ assert_eq!(vec![1, 1, 1, 2, 2, 1], foo.next().unwrap());
+ assert_eq!(vec![3, 1, 2, 2, 1, 1], foo.next().unwrap());
+}
+
+pub fn solve(input: &str) -> usize {
+ let seq = input
+ .chars()
+ .map(|c| c.to_digit(10).unwrap() as usize)
+ .collect::<Vec<usize>>();
+ let mut look_and_say = LookAndSay { seq: seq };
+
+ for _ in 0..40 {
+ look_and_say.next();
+ }
+
+ look_and_say.seq.len()
+}
+
+struct LookAndSay {
+ seq: Vec<usize>,
+}
+
+impl Iterator for LookAndSay {
+ type Item = Vec<usize>;
+
+ fn next(&mut self) -> Option<Vec<usize>> {
+ let mut s = Vec::new();
+
+ let mut digit = self.seq[0];
+ let mut count = 0;
+
+ for &i in &self.seq {
+ if i != digit {
+ s.push(count);
+ s.push(digit);
+
+ digit = i;
+ count = 1;
+ } else {
+ count += 1;
+ }
+ }
+ s.push(count);
+ s.push(digit);
+
+ self.seq = s.clone();
+
+ Some(s)
+ }
+}
diff --git a/rust/src/lib.rs b/rust/src/lib.rs
index e80acd3..8cb05f2 100644
--- a/rust/src/lib.rs
+++ b/rust/src/lib.rs
@@ -13,3 +13,4 @@ pub mod day_06;
pub mod day_07;
pub mod day_08;
pub mod day_09;
+pub mod day_10;
diff --git a/rust/src/main.rs b/rust/src/main.rs
index d0e9c96..05febe4 100644
--- a/rust/src/main.rs
+++ b/rust/src/main.rs
@@ -7,5 +7,5 @@ use advent_of_code::*;
fn main() {
let mut input = String::new();
io::stdin().read_to_string(&mut input).ok();
- println!("{}", day_09::solve(&input));
+ println!("{}", day_10::solve(&input));
}