From cc49d8009de18f6e01a44e9f4b1f8bf41674c0dc Mon Sep 17 00:00:00 2001 From: Alex Selimov Date: Sat, 7 Dec 2024 23:05:05 -0500 Subject: [PATCH] Updates day 6 and 7* - Implment part1 of day 6 and both parts of day 7 --- README.md | 2 + day6/Cargo.toml | 6 + day6/src/lib.rs | 225 +++++++++ day6/src/main.rs | 13 + day6/test_inputs/input.txt | 130 +++++ day6/test_inputs/test_input.txt | 10 + day7/day7.py | 36 ++ day7/input.txt | 850 ++++++++++++++++++++++++++++++++ day7/test_input.txt | 9 + 9 files changed, 1281 insertions(+) create mode 100644 day6/Cargo.toml create mode 100644 day6/src/lib.rs create mode 100644 day6/src/main.rs create mode 100644 day6/test_inputs/input.txt create mode 100644 day6/test_inputs/test_input.txt create mode 100644 day7/day7.py create mode 100644 day7/input.txt create mode 100644 day7/test_input.txt diff --git a/README.md b/README.md index 412fec9..2c94e44 100644 --- a/README.md +++ b/README.md @@ -11,3 +11,5 @@ Below are a list of the programming languages used to solve each day: - Day 3 - Rust - Day 4 - Rust - Day 5 - Python +- Day 6 - Rust +- Day 7 - Python diff --git a/day6/Cargo.toml b/day6/Cargo.toml new file mode 100644 index 0000000..46c0229 --- /dev/null +++ b/day6/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "day6" +version = "0.1.0" +edition = "2021" + +[dependencies] diff --git a/day6/src/lib.rs b/day6/src/lib.rs new file mode 100644 index 0000000..6e37e7b --- /dev/null +++ b/day6/src/lib.rs @@ -0,0 +1,225 @@ +use std::{ + collections::HashSet, + error::Error, + fmt::Display, + fs::File, + io::{BufRead, BufReader}, + rc::Rc, +}; + +/// Basic error type +#[derive(Debug)] +enum ParsingError { + ParserFailure, + IndexOutOfBounds, + InconsistentGrid, +} + +/// Enum dictating the direction of the guard +#[derive(Clone)] +pub enum GuardDirection { + Up, + Right, + Down, + Left, +} + +impl GuardDirection { + // Cycle through directions when guard hits an obstacle + pub fn cycle(&self) -> Self { + match self { + GuardDirection::Up => GuardDirection::Right, + GuardDirection::Right => GuardDirection::Down, + GuardDirection::Down => GuardDirection::Left, + GuardDirection::Left => GuardDirection::Up, + } + } +} + +impl Display for ParsingError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + ParsingError::ParserFailure => write!(f, "Failed to parse segment"), + ParsingError::IndexOutOfBounds => write!(f, "Index out of bounds for CharGrid"), + ParsingError::InconsistentGrid => write!(f, "File is not a consistent char grid"), + } + } +} + +type MyResult = Result>; + +impl Error for ParsingError {} + +/// Struct that flattens out the input grid +#[derive(Clone)] +pub struct CharGrid { + pub chars: Rc>, + pub m: usize, + pub n: usize, + pub guard_position: usize, + pub visited_positions: HashSet, + pub guard_direction: GuardDirection, +} + +impl CharGrid { + /// Take a file and split it into a CharGrid. Since input has only ASCII characters this should + /// be fine + pub fn new(input_file: &str) -> MyResult { + let file = File::open(input_file)?; + let reader = BufReader::new(file); + + let mut m = 0; + let mut n: Option = None; + let chars: Vec = reader + .lines() + .map(|line| -> MyResult> { + let parsed_line = Vec::from_iter(line?.chars()); + m += 1; + if n.is_none() { + n = Some(parsed_line.len()); + } else if n.unwrap() != parsed_line.len() { + return Err(Box::new(ParsingError::InconsistentGrid)); + } + Ok(parsed_line) + }) + .collect::>>>()? + .into_iter() + .flatten() + .collect(); + + let guard_position = chars.iter().position(|&x| x == '^').unwrap(); + + // Safe to unwrap n because it is validated if we get to this point + if chars.len() != m * n.unwrap() { + Err(Box::new(ParsingError::ParserFailure)) + } else { + Ok(CharGrid { + chars: Rc::new(chars), + m, + n: n.unwrap(), + guard_position, + guard_direction: GuardDirection::Up, + visited_positions: HashSet::new(), + }) + } + } + + /// Get an index within the grid + pub fn get(&self, i: i32, j: i32) -> MyResult { + let idx = self.two2one_index(i, j)?; + Ok(self.chars[idx]) + } + + // Convert the one dimensional index to two dimensional index + pub fn one2two_index(&self, idx: usize) -> (usize, usize) { + let i = idx / self.n; + let j = idx % self.n; + (i, j) + } + + // Convert the two dimensional index to one dimensional index + pub fn two2one_index(&self, i: i32, j: i32) -> MyResult { + if i < 0 || j < 0 { + Err(Box::new(ParsingError::IndexOutOfBounds)) + } else if i as usize >= self.m || j as usize >= self.n { + Err(Box::new(ParsingError::IndexOutOfBounds)) + } else { + Ok((i as usize) * self.n + (j as usize)) + } + } +} + +struct MoveGuardResult { + new_grid: CharGrid, + guard_exited: bool, +} + +// Moves the guard on their current path until an obstacle or they leave the map +fn move_guard_on_path(grid: &CharGrid) -> MoveGuardResult { + let (guard_i, guard_j) = grid.one2two_index(grid.guard_position); + let to_visit: Vec<(i32, i32)> = match grid.guard_direction { + GuardDirection::Up => (-1..guard_i as i32) + .rev() + .map(|i| (i, guard_j as i32)) + .collect(), + GuardDirection::Right => (guard_j as i32..grid.n as i32 + 1) + .map(|j| (guard_i as i32, j)) + .collect(), + GuardDirection::Down => (guard_i as i32..grid.m as i32 + 1) + .map(|i| (i, guard_j as i32)) + .collect(), + GuardDirection::Left => (-1..guard_j as i32) + .rev() + .map(|j| (guard_i as i32, j)) + .collect(), + }; + let mut new_grid = grid.clone(); + + println!( + "{:?} {}", + new_grid.one2two_index(new_grid.guard_position), + new_grid.guard_direction.clone() as usize + ); + let mut last_pos = grid.guard_position; + for (i, j) in to_visit.into_iter() { + let c = match grid.get(i, j) { + Ok(val) => val, + // Guard left the grid + Err(_) => { + println!("Failure"); + return MoveGuardResult { + new_grid, + guard_exited: true, + }; + } + }; + + if c == '#' { + new_grid.guard_position = last_pos; + new_grid.guard_direction = new_grid.guard_direction.cycle(); + + return MoveGuardResult { + new_grid, + guard_exited: false, + }; + } else { + new_grid + .visited_positions + .insert(grid.two2one_index(i, j).unwrap()); + + last_pos = grid.two2one_index(i, j).unwrap(); + } + } + + MoveGuardResult { + new_grid, + guard_exited: false, + } +} + +pub fn calc_unique_spots(grid: &CharGrid) -> usize { + let mut result = move_guard_on_path(grid); + while !result.guard_exited { + result = move_guard_on_path(&result.new_grid); + } + + // +1 to account for intial guard position + result.new_grid.visited_positions.len() + 1 +} + +#[cfg(test)] +mod test { + use super::*; + + #[test] + fn test_char_grid() { + let grid = CharGrid::new("test_inputs/test_input.txt").unwrap(); + } + + #[test] + fn test_guard_calc() { + let grid = CharGrid::new("test_inputs/test_input.txt").unwrap(); + + assert_eq!(calc_unique_spots(&grid), 41); + } +} diff --git a/day6/src/main.rs b/day6/src/main.rs new file mode 100644 index 0000000..68f2275 --- /dev/null +++ b/day6/src/main.rs @@ -0,0 +1,13 @@ +use day6::{calc_unique_spots, CharGrid}; + +fn main() { + let grid = match CharGrid::new("test_inputs/input.txt") { + Ok(grid) => grid, + Err(err) => { + println!("Failed becuase of \n{err}"); + panic!("Program failed to execute") + } + }; + + println!("Solution to part 1 is {}", calc_unique_spots(&grid)); +} diff --git a/day6/test_inputs/input.txt b/day6/test_inputs/input.txt new file mode 100644 index 0000000..9140912 --- /dev/null +++ b/day6/test_inputs/input.txt @@ -0,0 +1,130 @@ +..........#...........#...........#.............................#......................#.........#................................ +..........................#.........#......#.................................#...........................#........................ +..................................#...#................................................................................#.......... +.#...............#.....#..........#.........#......#........#................................#......#............................. +...#.......#.............#.............................................#.........##...............#.................#............. +.......................................#.............#..................#........#.......#.........#...............#.........#.... +.....#..................#..#..#.........................#...................#....#........#.............................#......... +.......#.............................#..........#......#..........................##......#.......................##.............. +.....#.....#........................................................................................#.......#..................... +.................................#............#...#.....................................................#.........#............... +...............#.....#..#....#....#.....................................................#............#........#.#................. +.......#.....#...........................................................#............................#.................#....#.... +...........................#.................#....................................#...............#..#........................#... +.....#.........................................#.................#...##....................................#...................... +.............#...#..................#......#.................#..........................................#.....#..........#........ +.................#...............#............#.......#.#...............................................#..................#...... +.....#..#.....................#.......................................................#..............#..............#.......##.... +..##........#....................................................#.............#..............#........................#..#....... +..............................#...........#...#........................#............#..........................#........#........# +.....................................##...............................#............#............#....#............................ +...##........................#.....#....#.........#.................................................#............................. +...............................#................................#...............#.....#.....................#..................... +................................................#..........#....#............................#.....#.......#..................#... +.............#.....#.........#.#....#................##......#.............#...................................................... +..........#..............#..........#......#.........#...#.........................................#.#.....#.........#............ +..................#......................#.............................#...................#.....................................# +................#.....#..............................#.............#.............#..#.....#....................................#.. +.........#.#................#.........#.................#...................#................................#................#... +.............................................................#..............#..................................................... +......#.........................#...........#.........#..................#....................................#..#...........##... +.............................................................................#.............#........................#...#......... +......#......#..#............#..............................................#....#..#..#................#.........#....#.......... +........#........#.........#....................................................^..#...#....................#...............#..... +..#....#...#.......................................................................................................#.............. +.....#...........................................#..............#.........#....#........................................#......... +.....................................#..............#............................................................#................ +.....#.......................#........................#..........#.............#.................#..................#............. +.......................................#......#.....................................#.........................#................... +...........................................................................................#............................##........ +..#............#..........................#...........#...#..................#......#.................#.#.................#......# +.###......#....................#...#...........................................................#.........#.....#..............#.#. +....................................#..........#.....#.......................#...............#.....#......#...................#... +...#......#..................#......#.......#..............#..............#....................................................... +..........#....................................................................#................##.#...#.......................... +.........................................................#..................##.....................#..##.......................... +..................#......#.................................#.................#.##................................................# +...#..........#...#..#..............................................#...........................##........#....................... +.....#................................................#...........#..................#...#.................................#...... +.......#.....#.........................#.......................................................................................... +....................................................#........#....#....................................##..............#.....#.... +............#........#.........................#.................................#..........................................#...#. +.....................................#........................#...................#......#.#...........#..#..........#...........# +................#...............#.........................#.........................#........#..#................................. +.............#.........#.............#.#.#.........#...................#.......#.......................#.......................... +.............#......................................................#................................................#.......#.... +....#....................................................................#.#........#.................#..........................# +.................................#......#....................................................................#.....#.............. +............##...................#.......................................................................#.........#........#..... +#..................................................#..#...............#............#.............#...............................# +.............................#.................................#.....#..........................#.............#..#...#...#........ +...#.....#..............................#.#......................................#................................................ +...#............##...............................#............#..............................#................................#... +#.................#......##..............................................................#...........#........#...#............... +....##.....................................................................................................#.#.................... +#.................#..................................................#..................................................#......... +.........#.........#...........................#.................#.#.............................#................................ +................................#............#................................................................#................... +.....................................#............................................#.##......##........#........................... +....#....................................................#...#.#.#....................................................#........... +.........................#.#...................#...................##...............#........................#.................... +..................................#...................................................................#.......#..................# +...................#.............................................#.......................#.#.....................#....#........... +#....................................#.#..#.#..........#.........#.........##.........#......................#............#....... +...............................................................#.............................##....#.......#...................... +.............#......#.#.........#............................#............................#....................................... +......................#.........#.........................................................#...#............#...................... +...................#.....#.....................................................#.....................................#............ +...............................#.....#..................#.......##................................................................ +.............................................#.........................#...........#..............................#..#............ +#..##..................................................................................................#......#...........#.....#. +.......................................................#.....................#.............................#...................... +...........................................................................................................#...................... +......................#..............................................................#............................................ +...........................#.....#......................................#.........#........#..#.#................................. +.#.......#........................................................................................................................ +.#.......#...........................................#................................#........................................... +.........................................................#........................................#......#........................ +...............................#...#........#............................................#.................#...................... +......#.........................#......................#.....#.#..............#..................#.......#..................#..... +.................#........#...#........................#.............................#............................................ +#...........................................................................#............................#................#....... +..........................................................................#................#...................................... +.............#.............................................................................#.........................#............ +.#...........#.......#.......#.....#....#.......#........#....................#........................#........................#. +...#..............#.............................#.............................................................#...#..#..........#. +......#......#.#...............##................................................................................................# +....#........#.##......#...#...................................................................................................... +..#..#.#.#.....................#................................#...................................#.....#...#................... +.....................#.#........#..............##..............#.................#..............................................#. +...................................................................................#........#.......#....#............#........... +.....#....#..................#...............#.............................................#.#....................#............... +.....................#..........#............#..................................#......................#.#.....#................#. +..........#.........................................#...............#............................................................. +.......#......................#.............#.....#..............#........................#.....#.........#.................#...#. +..................................................................#.....#...............................................#........# +.......#..........#.......#....#.......#..........#....#............................................#.#........................... +..#...........#..............................#....................#....................#...#...................................... +.......#...............................#............#.....#.....................#................................................. +.........#..................#..................#.................................................................................. +..........................................................................................#....#...................#.......##..... +..................#.............................##.......................................................#.......#......#......#.. +...#.......#..............................................................................................#....................... +............#..#..............................................................#...........##....#....#.#................#........# +............#.........................#........#....#..#..................................#..................#.................... +......##......................#...##..............................#............................................................... +........................#................#..............#...##...............................#..................##....#........... +....#.#...#.....#..................................#..............................#...........#.....................#............. +......................#.........................................................................#..........#.............#........ +.#......#............................................................#...............................#...#........................ +.......##.....................#.....#...........#......##.......##...................#...............................#............ +...#...#........#...............#......#......#.....#...#.................................................................#....... +..................#.......................#...............................................#.................#.............#..#.... +.....................#.......#....#...#............................#.....................#............#.....................#..... +................................................................#....#......#............#..................#.........#........... +.......................#...................#..............................................................................###..... +...............................#...........#................................#........#..#....#............................#....... +....#......#...............................#...............#......................................#............................... +...........#...........................##.........................................................................#.#............. +.........................#.........#.........................................#.....#...................#.....#.......#............ +.............................#.....#................##..#.....................#................................................... diff --git a/day6/test_inputs/test_input.txt b/day6/test_inputs/test_input.txt new file mode 100644 index 0000000..a4eb402 --- /dev/null +++ b/day6/test_inputs/test_input.txt @@ -0,0 +1,10 @@ +....#..... +.........# +.......... +..#....... +.......#.. +.......... +.#..^..... +........#. +#......... +......#... diff --git a/day7/day7.py b/day7/day7.py new file mode 100644 index 0000000..3afe078 --- /dev/null +++ b/day7/day7.py @@ -0,0 +1,36 @@ +import itertools + + +def is_possible(nums, answer, op_list): + for ops in itertools.product(*[op_list for i in range(len(nums) - 1)]): + val = nums[0] + for num, op in zip(nums[1:], ops): + if op == "+": + val += num + elif op == "*": + val *= num + elif op == "||": + val = int(f"{val}{num}") + if val == answer: + return answer + + return 0 + + +def analyze_equations(file, op_list): + with open(file, "r") as f: + sol = 0 + for line in f: + answer = int(line.split(":")[0]) + nums = [int(val) for val in line.split(":")[1].split()] + sol += is_possible(nums, answer, op_list) + return sol + + +if __name__ == "__main__": + print("Solution to part 1 is {}".format(analyze_equations("input.txt", ["+", "*"]))) + print( + "Solution to part 2 is {}".format( + analyze_equations("input.txt", ["+", "*", "||"]) + ) + ) diff --git a/day7/input.txt b/day7/input.txt new file mode 100644 index 0000000..c39c1cc --- /dev/null +++ b/day7/input.txt @@ -0,0 +1,850 @@ +3227574: 327 47 15 6 7 2 +9687: 6 72 7 3 615 +2594771266: 7 6 5 5 8 8 8 4 5 55 326 6 +9900354400: 8 75 9 9 2 5 451 6 8 50 +218532: 65 335 7 71 2 +5776: 4 3 4 4 2 9 25 3 6 1 5 34 +7309059: 429 5 3 3 22 9 54 7 8 43 +77080410: 870 8 3 615 18 +2049996956464: 6 1 8 7 6 609 6 9 4 10 6 4 +386477825679: 483 8 77 825 682 +7329: 255 2 545 3 9 1 3 82 2 +478524813922: 9 202 4 13 8 5 1 1 2 9 22 +3007459428: 37 5 963 7 7 4 2 4 4 +422124078: 7 603 23 7 3 76 +5590: 6 5 86 +2117616971: 293 840 239 4 7 47 9 5 +487830: 6 6 673 2 43 5 8 +61079143573: 403 421 985 302 7 36 +977246: 9 4 61 72 46 +49897223040: 82 1 49 20 69 2 7 127 +103551: 8 81 7 7 483 68 +804651: 2 9 1 8 92 2 5 45 2 9 78 3 +57232: 8 14 7 73 1 +3223472338: 1 8 592 3 7 4 3 85 2 85 4 +7246: 8 7 7 35 738 72 1 7 2 91 +8205611676: 6 475 7 4 25 3 77 5 9 89 +17496: 1 4 2 58 2 97 25 9 5 2 +6066983: 15 8 8 2 4 9 5 7 1 8 787 +110265: 59 72 14 589 8 638 +397765000: 5 233 7 50 76 +3574: 9 20 9 854 3 445 +8788843: 5 3 6 42 46 6 448 +941274: 43 38 64 10 9 +46254840: 50 1 85 2 90 920 +9928719793: 99 28 71 97 93 +8039: 49 881 7 3 942 584 +4424: 9 10 8 52 56 +16594: 68 8 8 29 553 3 30 +32779706264: 9 955 109 34 179 80 5 +155416: 146 8 58 9 73 +71402282: 643 1 571 8 892 97 2 +596625317: 8 6 4 3 8 922 664 443 4 +1655597: 19 76 93 5 80 +180478522: 982 31 8 4 15 795 7 7 +69316854415: 8 8 44 7 90 444 7 88 39 +23249578: 4 58 4 9 578 +685309395: 707 54 45 38 1 9 965 +365768589312: 639 224 868 64 46 +48064134240: 1 7 9 6 2 1 46 5 24 327 6 +2165926308: 1 30 94 18 7 306 +786903: 82 133 61 60 6 +641179: 1 1 724 1 8 3 18 3 1 847 +20800560: 4 1 60 5 560 +6018507918: 4 2 8 99 7 797 6 9 7 8 6 9 +3328603616953: 207 3 67 54 5 1 2 8 9 53 +15081270118: 21 436 33 270 117 +11531217929088: 858 208 962 71 946 +532575: 4 50 532 8 8 85 5 62 8 +528903: 244 327 92 9 342 7 1 2 +60231276: 60 17 2 56 3 27 1 5 +272934937796: 27 293 4 93 77 96 +1476196: 10 655 29 520 67 206 +753127: 1 2 3 3 3 4 710 81 6 2 4 +1841604240: 7 98 3 83 80 4 8 5 1 7 6 8 +188949705610: 258 712 740 139 1 8 +5585592600: 2 4 5 7 88 7 856 7 75 1 3 +11694266932: 1 3 898 3 2 5 8 8 85 1 7 2 +31334: 8 2 92 15 59 9 3 7 9 6 9 5 +134027418420: 21 967 666 10 991 +360462: 761 59 84 8 598 +195480415: 488 70 4 3 63 53 +1711173: 7 22 59 1 73 +38688: 8 1 39 4 31 +7066563480: 173 708 3 60 678 +40914726: 3 5 263 9 4 1 1 5 5 8 54 6 +73484562626: 4 7 4 628 494 8 3 4 9 24 +30705937: 3 8 4 2 73 188 44 1 8 3 5 +107934538: 7 4 385 5 948 +1364548120: 3 1 44 548 118 +9327031128: 96 7 487 25 95 3 +97634211840: 2 4 23 8 55 8 9 6 6 82 4 9 +126408: 6 92 229 +58870: 5 53 870 +24754665: 27 496 8 9 7 9 3 8 3 3 8 2 +15038158: 404 25 62 6 58 +267920541: 2 8 8 7 6 293 4 3 8 6 7 3 +319021767756: 4 4 3 8 686 2 343 741 9 +6454: 86 3 386 6 1 6 +38601032: 2 8 4 5 771 9 73 8 5 9 4 8 +166848: 920 5 688 872 43 66 +56982752: 8 661 8 39 7 39 8 +209693: 370 9 7 79 106 +43128053: 299 5 2 72 52 +1071: 5 7 989 7 40 +852390: 405 42 4 630 3 +7054549: 371 6 692 9 4 7 1 5 4 8 1 +55776906: 36 5 5 730 1 3 413 1 17 +873: 55 1 712 5 99 +303164: 2 5 1 2 1 2 59 7 8 424 3 1 +2175: 17 808 79 741 533 +11157263487: 111 514 1 57 634 8 7 +1471606: 1 884 773 96 839 +17558973: 5 2 5 2 55 3 4 7 7 811 9 3 +573: 37 6 81 4 266 +284703: 97 57 165 5 6 +689440323: 9 4 783 4 8 1 8 2 1 8 65 5 +121: 18 2 2 3 7 +478: 9 1 82 4 1 98 41 1 2 8 +18735650: 8 7 8 2 3 6 10 197 947 +102836046: 12 86 24 375 84 60 4 7 +465281475: 973 695 45 688 837 +656: 4 1 615 +136761048: 3 3 84 8 13 3 3 5 11 1 89 +1783: 68 933 253 1 4 525 +158: 9 6 83 21 +115959: 832 265 61 77 5 71 4 +2487131: 510 62 2 7 9 4 79 1 53 +5170: 6 6 1 8 4 9 1 6 1 803 36 5 +1928601600: 8 86 6 5 2 584 80 +59821: 462 8 3 123 1 987 655 +398537804644: 853 40 467 4 644 +339459939: 7 7 4 88 253 7 9 +481903856: 29 1 60 26 276 675 8 +680603: 9 20 13 2 9 892 5 2 +236736973260: 7 6 5 77 52 4 1 6 34 1 6 6 +398228: 115 4 5 69 98 +120581: 28 81 65 8 17 +267735216: 8 19 6 4 81 57 378 216 +74602849: 5 406 23 1 6 49 +2719990: 597 521 243 325 10 +34500: 5 67 7 1 60 +5140800: 510 7 5 2 36 4 +190594626: 91 817 84 68 6 4 8 8 +20232583: 8 7 357 80 28 36 5 2 +5811831187: 577 8 2 31 8 294 9 8 8 9 +7866: 2 23 893 372 6 +10169305: 248 62 409 3 7 5 732 +249434091: 117 7 5 989 7 962 3 93 +388494: 7 92 3 49 6 +912769496103: 45 935 98 733 302 +2264409594: 51 8 555 958 5 7 +724415: 2 4 7 8 1 9 942 3 1 9 3 4 +15942816: 7 8 338 72 562 +40785800: 6 2 8 24 7 432 25 +3483666656: 34 83 388 278 656 +3018057: 5 4 3 138 810 +170416569009: 3 6 4 2 92 731 7 951 55 +324724224995: 6 445 72 422 499 6 +12229264: 1 1 4 21 6 34 562 7 5 1 4 +3392: 4 7 67 288 58 8 +305431434300: 6 91 7 76 12 701 8 5 3 +151905613125: 8 5 5 2 1 28 12 1 31 2 3 +207879696: 6 4 7 7 9 5 540 7 54 72 +6913: 37 37 1 1 69 994 1 6 85 +432614183289012: 5 40 767 729 1 8 901 1 +82500961: 97 47 679 2 100 1 961 +3966848: 71 31 206 3 6 9 92 128 +12453120522: 60 1 850 33 5 6 40 522 +2982342779: 18 79 2 39 2 1 1 4 3 77 9 +5445: 6 7 27 1 3 1 56 4 31 1 33 +81877448: 419 3 7 2 4 173 8 8 17 8 +1071576868615: 7 81 8 3 2 7 668 8 9 979 +39301: 4 9 62 46 8 289 94 2 6 1 +377089313: 68 1 72 8 3 9 4 6 3 7 4 3 +664442: 113 40 3 7 7 2 +132694431: 33 1 39 94 428 +4716520604: 4 7 3 4 7 1 4 3 9 696 4 2 +835717: 500 97 238 7 17 +5575854: 13 266 26 9 6 9 5 6 177 +647629: 612 35 5 82 47 +62599894469: 5 148 4 8 3 7 19 3 1 4 38 +93928: 4 13 5 81 5 5 27 771 3 4 +17496650: 9 3 268 403 6 +553454090700: 1 7 357 8 20 911 35 +1661589: 2 373 70 2 480 7 +3028862: 60 50 23 5 862 +1122: 35 6 169 1 743 +97923737484: 2 8 68 9 3 73 74 84 +1882185081: 146 9 81 604 5 9 2 4 +193: 180 6 7 +22771440: 9 6 8 4 2 8 96 4 109 5 3 4 +100144066185: 7 286 794 352 1 9 1 7 +117453: 6 6 1 15 2 4 9 3 819 3 47 +1182792: 8 8 6 33 301 453 9 +61425: 2 9 2 183 7 585 2 6 75 +1783100180: 29 589 64 19 4 52 2 4 +83116480: 3 701 3 5 754 9 4 5 368 +2554371618: 8 78 7 3 3 9 401 8 7 9 6 6 +7978985: 7 97 88 1 85 +81207109035: 810 6 7 7 710 3 5 2 8 3 5 +3081162: 3 368 3 93 3 3 153 +484464334: 1 19 9 78 9 426 9 4 1 89 +255347157090: 7 7 2 5 68 497 413 12 4 +633738987: 5 9 43 1 7 8 9 8 3 2 137 3 +384258: 44 2 9 284 3 9 +23707011: 505 48 7 67 +1151869: 7 6 5 2 7 282 719 3 25 6 +9298808: 287 9 60 6 6 +31106: 969 8 4 94 4 +325378: 18 3 6 1 379 +774250866: 49 1 448 457 9 7 61 6 9 +206132: 36 8 7 80 52 +530: 35 9 4 78 8 +3031: 2 28 40 7 91 692 +81159303: 16 23 5 9 303 +932115: 56 38 146 3 51 +3298555318: 5 3 7 3 547 3 1 114 318 +5418296580: 152 11 259 68 8 23 4 +54817: 99 1 9 507 61 +539917: 503 1 3 5 5 2 5 3 3 262 7 +124292: 85 56 880 212 +136186: 5 8 2 273 8 6 9 80 26 +3470: 6 3 7 4 96 293 238 5 +14215140: 4 16 9 151 523 +63453: 9 3 77 7 68 46 99 +6679: 823 8 25 67 3 +8223408518: 7 59 72 3 524 5 844 8 1 +76953054: 3 39 8 975 1 67 128 6 +644630: 889 80 19 7 35 +1299: 7 6 7 988 17 +395708417484: 1 8 812 99 1 402 914 6 +667118: 1 7 886 9 94 +295533124: 4 418 17 2 7 124 +210933216: 35 5 794 7 830 42 8 +15299816: 796 719 9 5 98 14 +1368564: 6 6 5 82 36 70 9 23 8 8 4 +93541755: 8 12 49 9 8 235 5 +65835: 4 2 75 93 95 +1387924874: 939 40 4 1 9 26 7 542 +5011: 49 90 8 555 38 +1109391: 9 14 482 7 91 +1080359: 1 2 1 97 7 3 9 47 23 6 9 +921422389333: 4 7 176 7 6 9 4 7 786 7 5 +24024219: 3 16 5 24 216 +148: 4 6 6 4 +14399719: 624 641 12 96 3 7 +8462256992: 4 66 47 682 991 +46807: 3 3 1 9 13 36 475 +1759128: 5 3 49 4 518 +7123596: 9 14 9 5 3 3 77 27 936 6 +5643205210: 8 9 2 89 3 40 9 5 618 2 8 +226923671: 2 7 85 4 5 2 528 9 4 6 7 6 +96748274741: 5 5 143 551 82 7 7 39 2 +38772531613: 3 7 20 923 57 8 3 1 613 +6724653: 960 591 8 40 7 173 6 +269994403: 26 931 22 507 679 +166069764: 5 2 6 69 9 582 74 378 +8340: 6 7 4 4 69 20 60 +2720: 1 544 5 +28299754: 2 48 27 5 516 7 3 8 7 7 +172013600: 5 14 6 9 8 526 9 7 5 32 +21345727568: 6 3 8 3 456 8 4 7 5 42 26 +815985723: 969 51 3 782 341 +1037725392133: 415 5 45 5 39 213 3 +4941379880: 2 470 6 8 9 6 2 7 59 9 1 8 +51044: 486 9 1 3 7 328 28 +6461326925: 2 584 5 25 6 7 2 7 924 +547138924: 801 5 11 812 4 76 7 21 +8928: 91 4 3 91 1 3 7 +3686: 83 3 6 1 4 +2099160: 42 7 20 357 +60636749: 732 5 1 253 594 8 +296684: 6 1 836 3 43 334 92 +2808: 6 67 386 9 6 +273506833: 5 7 356 1 64 98 833 +17: 2 9 7 +76731026953: 3 9 27 7 475 7 1 5 5 995 +30914: 2 13 6 161 6 1 +1624102: 668 7 1 3 6 399 970 +126619: 26 93 47 46 2 +362391: 36 2 39 1 +7123460: 368 872 9 1 4 319 95 2 +30918666: 281 11 8 6 66 +22085: 75 5 8 155 7 +462860: 46 264 9 13 3 +699209426: 1 3 7 1 11 9 3 3 980 9 3 1 +140400: 70 20 20 +352904605: 9 3 603 4 2 7 2 3 8 6 74 3 +435840: 676 5 640 +17865408000: 3 5 40 5 5 769 352 48 +108274521: 5 2 9 318 2 66 3 7 9 8 4 3 +9621: 9 12 9 25 469 +1345843: 832 58 1 53 803 8 2 +683682: 362 5 3 41 4 9 5 852 +118548: 5 9 6 259 442 +249315946: 510 7 253 241 2 +5740521: 7 90 283 14 59 +303269403: 678 71 700 9 3 +214801337: 2 558 800 39 383 +2981629: 21 5 1 6 7 4 8 3 161 1 7 1 +38879: 1 55 3 656 828 +883: 452 18 354 1 58 +1843: 43 56 3 3 6 7 +49728956988: 4 8 37 7 6 5 4 563 6 5 3 7 +1970039832: 19 767 68 899 41 +24756505: 1 9 7 891 1 4 7 9 7 1 1 86 +2904811: 322 62 90 532 701 +60197: 45 3 3 3 8 9 18 1 2 9 75 2 +44194581822: 6 52 657 55 8 49 5 2 8 7 +4613575465995: 6 2 1 2 4 561 44 74 3 95 +28976: 86 48 7 56 4 20 +20970116: 8 1 7 55 768 272 46 2 2 +6439513: 234 402 23 772 1 4 +148417892: 148 417 823 70 +1211760: 6 17 3 55 72 +3053: 642 3 252 8 867 +155127: 605 390 390 56 2 7 +156240683: 7 8 2 2 406 83 +7319689: 308 1 9 9 25 26 1 67 9 +1386567: 286 6 21 1 6 94 1 8 7 +3570: 14 36 4 2 7 +140313599: 8 6 2 2 2 6 6 7 5 142 559 +475714543: 61 24 51 314 4 542 +493472: 9 8 42 31 364 7 9 8 2 8 +1990446: 4 62 463 9 6 2 3 4 38 9 6 +19619731: 713 6 622 2 9 817 2 97 +7245420: 93 7 4 3 762 2 7 96 84 5 +486048: 5 30 83 90 5 4 16 366 +189: 7 2 21 +10588484: 2 2 6 621 2 7 2 6 178 8 2 +41467203: 8 639 30 16 1 +7578933659: 9 3 270 87 934 1 +3253778: 8 33 7 6 39 7 +1002051099072: 3 477 50 15 7 70 72 +661076520: 565 5 600 68 390 +154: 1 6 6 6 82 +278413050: 55 6 73 9 610 5 +625523: 8 3 614 523 +22185893529: 322 689 9 3 52 9 +1170030: 605 2 623 951 40 260 +260802428: 820 318 42 428 +7710585: 7 689 3 5 4 9 212 372 +4753338: 59 7 72 59 1 6 5 680 +19263220581: 58 575 1 58 376 7 81 +143662750: 124 2 2 4 38 3 8 3 9 2 7 5 +38383696: 805 228 997 4 52 +23008: 8 4 191 8 7 +396000: 744 6 66 8 +20581: 56 36 41 8 3 +3038974: 7 2 7 31 974 +2192168: 47 4 9 9 415 3 619 548 +15190340: 250 124 2 5 49 1 +1748190: 1 3 5 7 69 4 3 3 56 3 19 5 +2752122321: 2 3 880 1 6 858 4 4 1 9 9 +21371: 5 9 471 81 95 +7077051: 729 24 4 7 351 21 5 1 +1879651: 70 9 203 68 98 376 30 +46368: 3 7 2 56 6 6 +2227217: 6 452 1 78 798 +10692793: 181 17 6 9 793 +257695277844: 1 875 3 9 6 74 73 7 2 7 4 +76560: 1 595 498 5 61 66 +422674260: 662 2 5 27 234 60 +29645694: 5 50 7 77 694 +4077: 7 31 1 3 97 +20124: 5 38 468 +52246009: 398 702 4 1 7 676 +183920019: 8 95 4 605 20 +1509: 5 4 24 6 3 6 12 6 1 500 1 +8613945: 20 8 92 3 39 66 15 +6172100: 52 9 72 10 10 +2661931: 5 1 8 2 4 8 8 45 6 5 8 963 +271485: 57 48 99 442 179 +877576528: 3 4 4 1 25 2 5 3 56 91 5 8 +1270688: 18 126 7 7 6 8 +1491826047: 35 6 565 7 92 50 +44169308: 84 2 36 7 4 5 369 4 5 9 8 +4088700: 5 6 3 15 35 236 +42397: 4 231 1 3 75 +33946371827550: 8 18 94 7 539 4 5 91 90 +12150505765: 666 48 7 38 561 11 4 5 +714573758: 916 3 360 6 26 +31145619648: 372 286 989 8 37 +139956508803: 59 79 4 3 650 8 800 +118473952: 7 14 7 783 544 +7902897756: 617 8 6 10 820 6 26 +30208315368: 94 4 32 30 548 989 1 +20053757176: 53 41 71 595 66 47 8 +2106458913061: 51 894 2 110 7 4 615 6 +219648: 1 91 98 76 8 +2660330: 140 79 6 51 8 2 776 5 1 +8554141: 28 38 9 120 4 5 3 25 3 7 +181258582: 8 16 5 1 74 9 81 4 2 7 8 +1251: 96 830 1 4 244 76 +139494973: 8 64 270 676 8 8 23 77 +1325910: 6 94 399 1 6 1 1 6 5 229 +481344: 4 11 3 3 814 7 9 3 8 +14656187131: 8 9 2 482 5 331 9 3 9 65 +523740: 2 7 870 43 +1698: 22 6 935 604 27 +132: 8 1 90 34 1 +22006: 537 4 3 525 +1771262: 3 3 2 7 3 6 90 2 5 2 530 2 +124740: 31 6 624 77 2 +158324958514: 98 124 4 4 814 3 8 57 2 +53688: 8 1 6 8 254 59 4 3 8 6 +243177827: 132 9 33 959 203 5 62 +5228981901: 8 849 21 61 899 +1540177: 7 4 208 6 86 292 +17690: 138 3 2 4 3 8 5 4 3 84 2 8 +64581: 524 508 34 60 577 44 +2074: 5 2 91 898 266 +42128: 61 226 60 3 494 1 95 +112104694: 3 481 51 322 72 +2730604169956: 8 46 22 5 911 27 37 5 6 +1585980: 91 35 1 6 401 6 9 55 +4267032808: 40 839 88 8 43 7 985 1 +858808: 4 501 17 2 31 74 3 +4662: 250 4 39 373 7 +3851847147: 61 3 6 3 5 1 79 4 471 4 9 +6976: 6 5 3 761 2 43 88 7 88 +85211: 5 843 8 33 4 +3244: 649 5 2 +65355595368: 803 628 3 9 9 4 4 2 2 4 4 +3523359: 3 8 32 3 359 +11562: 48 4 78 19 40 +105322: 6 4 9 1 7 1 4 16 51 8 7 51 +20605500: 1 1 6 6 2 750 723 +916509775588: 5 419 55 8 781 39 4 7 7 +103997754: 760 2 4 7 342 +502644: 481 19 2 112 532 +160306: 3 396 5 80 706 +543213320: 1 552 5 7 9 75 290 66 9 +56777760: 7 1 53 39 2 5 85 26 27 8 +964: 6 7 1 27 3 890 +7164611387: 98 4 2 8 14 6 6 6 1 1 3 87 +39122842249: 4 998 5 633 5 4 1 4 98 2 +1589106870: 16 7 6 7 56 4 9 65 6 501 +905335803034: 7 6 76 405 89 90 43 34 +203076: 13 1 529 5 8 6 5 9 4 6 6 3 +1149620: 765 4 7 6 7 5 5 59 5 231 +274240768: 3 6 6 848 153 5 +28931937070: 400 718 4 9 5 722 +1709184: 28 42 68 7 589 6 +4337709: 4 311 8 251 2 4 4 6 2 5 8 +14701512: 98 991 381 1 512 +701381793: 6 859 963 842 3 +71971: 6 7 339 5 1 624 146 10 +32099: 3 1 765 79 252 +171771: 1 623 87 36 98 64 1 6 9 +1042861683: 5 81 4 6 524 811 7 5 8 7 +41131530060: 712 57 18 7 900 33 60 +79601176: 1 8 64 6 6 6 2 38 11 7 6 +2298689026: 999 43 230 2 6 1 +4023037200: 2 290 1 883 51 780 4 5 +50040: 624 71 72 +1860631968498: 665 1 32 52 537 49 5 +204666336: 5 7 1 726 157 1 4 9 49 +38462212: 6 6 2 85 9 6 2 92 7 34 86 +376458353: 140 4 79 52 8 7 5 3 +5779904174658: 903 1 1 8 8 12 5 2 2 65 8 +2221128150: 26 21 904 9 3 50 +85561: 5 9 7 2 7 122 7 146 4 2 2 +194508948480: 616 4 8 58 642 265 +13084: 149 315 55 70 719 1 +1551214: 69 8 7 4 53 2 5 5 59 +6385500: 5 5 258 99 10 +735066: 21 350 66 +32052: 616 909 7 9 3 +74064: 4 6 681 3 23 +19992867: 44 5 136 3 716 95 56 +2573808: 814 4 79 4 304 +52476: 55 462 7 7 8 +18836346: 7 6 1 6 3 9 60 1 5 4 4 90 +143956: 95 54 963 380 89 +3913319: 2 1 26 3 1 2 4 2 6 813 3 +2253072: 38 971 5 99 438 +19921201: 4 980 8 5 2 6 7 91 843 +199146: 5 68 4 35 32 81 9 84 +3357288: 6 942 6 33 3 +578235348: 9 8 19 43 4 46 7 39 1 5 9 +1120784: 3 3 96 8 4 5 6 56 43 7 7 4 +3094520: 8 346 95 2 3 3 5 7 5 3 4 8 +3930: 5 6 7 286 9 619 41 1 2 +1180: 4 1 9 70 88 7 95 10 +349358: 4 363 951 83 255 +716: 5 2 3 93 6 32 +442532935: 8 195 9 42 6 47 6 4 6 37 +5558322248: 4 1 34 4 4 3 9 5 5 7 32 8 +5293550: 529 3 550 +6571: 2 5 4 447 77 59 3 +1408672499: 4 320 60 898 238 11 +561588221: 7 8 158 8 221 +1617: 161 6 4 +2746681: 914 82 68 8 3 1 156 +1068: 490 3 5 2 568 +416425074: 675 19 6 250 7 4 +26526852: 6 9 2 2 9 68 3 9 6 6 827 +6968637: 6 5 1 57 420 244 +192926880: 7 127 4 9 2 7 1 5 6 666 +244129082: 49 83 3 5 41 3 9 7 41 2 7 +24487936: 973 6 52 481 543 645 +5366629969: 9 2 8 7 948 6 3 7 7 75 17 +388034111: 2 80 6 479 4 101 586 9 +5155585: 2 853 5 19 3 87 24 49 1 +136274810: 483 7 3 62 9 254 35 +85955764328: 695 6 989 368 411 56 +5256179832: 1 82 7 2 884 799 428 6 +62734399669: 79 21 54 1 9 6 9 8 2 96 7 +256634764: 2 3 5 3 9 63 1 2 33 9 4 7 +2196189325: 21 961 88 95 7 368 +70511994822: 2 3 490 5 2 697 91 37 6 +22088: 5 1 7 1 5 6 4 7 97 82 1 2 +145941992: 8 6 152 4 6 9 1 5 36 2 5 4 +173029: 8 4 8 3 984 945 4 +1022333: 1 34 22 5 365 33 3 +14867740855: 1 44 2 661 781 54 +1137433680: 406 8 1 9 8 7 684 3 49 5 +20443486: 7 94 6 379 8 9 8 4 93 9 7 +492099487: 2 8 7 3 20 9 7 2 9 658 6 6 +90834615: 387 6 869 718 11 45 +1036638056: 945 3 45 243 56 +1724286: 9 8 31 191 534 +382158728: 76 42 1 5 5 3 72 8 +58670320: 42 9 1 9 5 7 401 344 88 +6194319: 1 330 99 95 6 62 173 3 +13725249049: 98 14 524 904 6 3 +475791360: 775 11 43 2 605 +176078330078: 3 78 77 5 3 1 6 9 203 5 5 +471606355: 1 65 7 6 335 6 54 1 55 +13599902: 8 8 3 8 269 20 207 36 +1311720: 9 57 7 9 474 40 1 +2782799: 8 82 53 5 5 2 8 671 288 +151025418604: 4 992 7 412 941 98 4 +6889365: 334 95 921 211 4 +1395052: 4 347 9 61 52 +685202675: 7 85 51 52 8 7 1 2 341 +106283: 7 30 26 225 25 6 6 2 9 +423138: 26 1 9 452 4 66 +443236: 6 70 75 3 957 69 3 895 +1415392: 9 15 35 5 7 6 9 18 5 6 9 8 +351077611: 45 7 5 3 3 93 7 7 78 6 5 8 +1263251133: 43 306 6 15 11 240 96 +83528: 3 6 97 86 87 95 +9740501: 80 426 385 50 +94537: 180 9 5 3 7 +100647633: 629 16 7 1 633 +47197641: 47 1 9 764 1 +80: 1 13 1 62 5 +30278117: 56 7 5 441 57 5 2 7 6 9 9 +5978082: 554 8 6 4 394 24 97 66 +417734832: 6 2 968 720 70 92 6 61 +670781: 416 6 9 245 2 3 2 9 5 8 5 +3010: 24 6 10 +7313227502: 265 8 7 4 1 5 7 1 8 2 88 +3040362: 63 1 1 1 91 514 52 +523261333625: 9 1 915 809 1 9 7 616 9 +276486972: 9 51 8 9 97 7 6 1 455 5 4 +52758: 18 290 69 7 593 54 +16390942: 2 3 732 9 4 253 935 27 +485240: 4 8 552 830 520 +189880: 18 967 5 120 87 +57611: 568 93 719 +39090876: 3 30 82 31 466 +108551: 53 7 4 3 73 +29753124395: 828 99 9 265 9 121 7 +24181: 1 78 8 38 4 6 5 3 6 139 2 +180774: 83 33 11 6 +4508292: 3 1 4 60 7 4 35 667 39 +8739: 30 79 2 2 4 +1132586025: 1 8 4 8 32 525 141 +68400: 7 9 9 3 912 +583127513765: 69 24 3 3 46 423 211 7 +275528030: 5 4 908 197 44 7 9 87 5 +100131239602: 90 66 39 43 7 46 7 8 2 +20364: 916 977 64 9 785 +3172070: 295 22 7 3 539 69 +67531026909575: 51 817 214 573 609 2 +415718109: 376 39 1 718 108 +143296133: 252 3 351 6 6 90 651 2 +37274164: 8 696 79 6 1 660 4 +343291371500: 75 836 634 51 1 70 2 +201717693276: 5 21 2 7 83 4 66 677 37 +8035042: 100 39 1 2 5 8 7 6 7 905 +251: 1 187 64 +7190499: 882 1 829 2 7 3 3 3 +13109: 9 7 74 2 72 68 2 1 66 8 5 +90541248356: 50 164 4 8 368 1 3 4 7 9 +37488529328: 5 138 24 7 66 27 49 8 +32596072: 267 8 27 954 556 1 7 9 +30691934237: 349 34 64 917 3 5 80 +713691: 78 227 259 206 97 9 9 +206: 10 1 196 +19451: 4 1 9 58 6 220 9 7 19 9 2 +15599: 3 12 599 +55917665: 2 4 2 2 5 771 2 9 518 83 +8693847: 66 467 7 3 94 69 +496064: 655 2 17 8 92 +119414568967: 58 7 5 9 7 8 906 4 4 2 9 1 +269963409: 63 494 2 323 5 3 3 +860479176: 9 2 7 7 3 3 9 8 4 61 2 771 +4670133944: 4 55 77 876 100 7 392 +10078381: 875 4 40 39 73 +3223068: 8 11 2 3 38 62 12 1 54 5 +179730136: 3 3 73 9 74 208 6 8 8 +302890364470: 6 5 966 3 5 196 26 95 +37: 23 1 1 8 4 +1197312: 8 72 9 63 82 2 6 7 3 48 +773436: 2 37 198 3 76 860 +167832000: 2 3 1 1 4 3 98 9 8 333 7 8 +183161250047: 373 32 268 5 75 45 47 +675951372: 57 87 921 37 4 +318979526521: 92 1 866 500 7 520 51 +34139791032: 828 25 4 947 758 2 2 +222717817: 380 44 45 25 296 7 10 +1136290832: 3 5 3 2 7 327 2 6 7 9 4 +65054925214: 111 990 8 611 74 +3093328: 14 320 5 6 702 1 7 7 16 +383323505169: 7 9 8 8 725 2 3 4 6 6 50 8 +3452869836: 5 2 6 9 5 2 71 3 476 6 6 3 +6878148: 543 8 33 7 1 5 63 5 5 6 +90298: 92 810 98 +14518235: 6 836 466 37 471 +781556: 7 9 8 30 2 193 1 4 3 6 3 5 +68649438: 4 714 81 26 899 +150072145: 19 5 5 2 74 26 1 6 4 84 +7926: 5 2 49 1 72 11 7 3 +94176: 269 603 108 +14903688: 5 298 3 6 88 +9718059: 7 964 799 7 56 6 +139950: 2 4 2 5 4 97 7 4 6 5 37 60 +567382186: 567 2 931 890 85 +248507: 5 10 68 73 307 +122844: 71 1 6 5 628 116 +1682235070: 58 569 4 8 63 532 +4641: 5 754 865 4 2 +1494663518: 17 4 859 3 3 6 5 69 86 +21982951: 44 991 1 8 8 87 9 7 46 +186041: 1 7 7 1 36 2 744 8 5 7 5 6 +1938320: 6 478 580 4 +8719949700: 794 10 8 4 9 5 4 246 62 +65959576: 5 9 5 69 7 8 9 265 1 10 5 +39739764: 73 9 4 8 7 192 37 3 332 +98531785: 9 822 31 17 83 +1610235387: 44 60 6 427 645 6 4 3 9 +3635: 6 17 603 22 5 +65193: 97 7 48 2 9 +7674: 8 954 7 1 34 +655960: 51 643 20 7 93 +403726458: 6 5 54 616 60 +42426724: 45 2 8 992 91 2 436 +9119647: 908 3 9 639 8 +75426: 9 848 88 7 6 +29444948: 7 374 3 28 4 3 1 3 7 926 +262760: 5 7 3 3 850 5 4 9 1 5 85 5 +342333: 84 97 59 1 4 89 +470790145: 5 755 9 4 2 96 6 3 9 1 +37850302: 64 5 88 42 102 32 +3129944268: 26 21 8 819 7 4 4 363 +2053663: 399 815 17 27 79 99 7 +12985519: 66 47 51 214 5 74 +344025: 3 9 7 9 868 9 1 320 25 +201204: 9 410 2 72 27 +223396628: 2 7 3 5 212 2 777 5 97 6 +3567168242: 1 1 2 9 3 12 4 563 242 +762224: 31 2 4 10 15 7 21 +81042320613: 30 9 3 4 231 9 67 3 940 +4476087598: 5 3 54 36 9 3 9 8 1 1 717 +71990: 95 2 377 7 353 +1042320: 5 64 581 26 6 +122005024: 254 3 3 953 1 8 94 7 1 8 +830286167: 4 18 1 76 627 17 616 7 +6630: 4 9 49 3 37 95 +3715488: 12 76 3 679 2 +1040785: 8 4 10 81 4 1 93 8 13 5 +73614182544: 92 8 141 82 5 45 +44451: 444 46 5 +4160658624: 8 5 3 8 7 952 879 7 6 24 +545290: 543 9 6 36 754 +31590: 9 56 9 2 338 65 +77123745: 82 3 6 92 1 9 2 8 4 3 1 9 +102178529: 1 5 96 709 6 463 530 +3115584: 8 593 6 9 96 +5141881: 20 7 552 9 5 +7389: 5 48 4 7 669 +3481344570: 2 82 359 73 8 54 7 7 5 3 +13601387: 8 1 8 3 89 5 5 5 168 4 8 9 +692071: 4 79 1 7 891 6 1 95 91 +85493: 758 11 211 3 +11201268749: 8 3 5 9 458 54 9 5 2 5 2 9 +9296: 9 3 3 9 4 6 6 7 507 30 6 8 +198657: 7 4 705 946 542 845 9 +36524791: 2 87 82 3 3 6 2 278 39 +27674: 5 72 39 66 9 51 2 +685688: 622 235 2 22 4 +1948912998: 35 2 5 4 5 448 9 129 9 8 +456756: 698 63 21 5 6 +465: 3 462 1 +733622023: 7 3 361 2 24 95 883 1 3 +969: 429 4 14 2 70 5 +17420824: 764 26 877 1 3 92 +9412554613: 266 2 93 35 45 28 85 +523886552: 178 2 2 3 72 81 74 973 +3446042: 6 796 263 9 5 9 359 +456: 8 8 1 23 369 +7502341408: 30 2 9 7 8 409 748 296 +3756824: 16 334 23 10 2 +71585312: 19 90 710 35 24 838 +9780184: 5 459 2 2 6 709 205 33 +304945: 2 75 29 1 945 +7109: 71 4 5 5 7 +49602855: 8 62 4 1 1 5 2 1 5 +15879: 61 6 79 3 +93464118405: 29 4 9 12 6 5 5 7 4 35 7 9 +303: 9 30 136 73 55 +4343982708: 2 9 37 26 1 5 47 4 2 3 9 +853: 79 9 54 +1405673: 721 683 75 9 2 3 901 8 +9865074002: 31 3 8 25 73 446 12 2 +315980: 9 9 5 7 244 +39166171: 326 30 11 543 4 2 +480960128540: 1 329 7 900 32 4 542 +6060315993: 7 94 60 31 59 94 +9947826: 1 99 478 2 8 +1303361821: 4 306 29 4 9 3 52 50 23 +12936284251: 1 46 912 270 6 436 51 +6912796811: 7 37 899 82 650 28 4 9 +137282561: 8 132 13 24 4 2 7 4 27 +2774467: 49 3 666 8 2 774 5 37 +2799169: 4 3 5 8 3 3 1 6 6 8 7 391 +25355753280: 5 3 37 437 9 8 4 1 9 605 +6859: 37 43 57 4 209 58 +1989634596: 944 7 2 430 25 6 4 7 93 +94301445: 303 4 464 331 433 2 3 +4997376: 24 301 488 648 +6730244: 668 78 424 4 5 +23888189390: 7 9 189 457 2 878 5 +8054503859: 6 5 87 5 932 739 42 59 +4508: 68 7 6 1 8 +12960: 7 1 3 134 2 9 2 1 84 3 9 +47545: 94 94 5 5 11 1 39 +468509: 117 90 516 3 54 1 4 1 +33132974: 136 3 1 2 4 2 81 4 9 67 8 +335211: 36 2 53 87 +1393152: 8 971 29 629 4 6 8 +551372987: 4 3 165 9 6 4 8 231 2 9 2 +289352: 20 95 30 807 5 315 2 +48241: 1 3 60 89 8 18 3 3 91 +26457: 264 26 31 +21312: 31 95 455 3 3 5 9 4 +104014: 65 228 7 271 +73649: 340 5 444 31 21 69 3 2 +581256609638: 38 98 2 39 4 609 6 3 4 3 +3313: 880 465 982 822 163 +3524987991: 348 3 775 723 1 79 90 +2003161924: 55 8 38 7 329 9 91 9 4 +227766085398: 243 9 983 74 95 4 94 +1573738: 864 1 1 8 3 9 4 5 +1225301724: 1 7 4 77 56 3 74 95 4 3 +10569342: 1 9 5 7 9 8 99 912 6 9 34 +372249600: 3 144 592 50 4 +7576416001: 64 986 96 296 81 5 +1241: 2 6 5 5 4 1 7 1 75 880 19 +38453844: 38 45 384 4 +3919923: 4 727 8 1 6 4 3 7 4 7 8 35 +12346626: 27 127 2 70 18 880 83 +1380741466611: 769 6 3 5 7 69 95 3 1 1 2 +47924803: 7 40 92 480 3 +7075706: 827 46 53 9 9 14 8 4 87 +243615: 686 71 4 8 5 17 8 +6624: 4 555 97 6 58 +298170180: 3 345 5 6 6 3 22 99 6 +457484301: 97 824 59 94 487 97 +75577385051: 98 797 410 855 7 236 +489803: 7 75 70 5 25 316 1 +437274394: 4 30 7 274 394 +164238341121: 37 854 1 524 92 39 2 9 +12720: 386 3 3 5 560 3 80 2 7 1 +1454630436: 7 1 2 183 5 96 6 69 9 4 +219969689: 1 61 6 61 40 3 8 9 6 8 3 6 +160720: 41 980 4 +3948228: 6 50 105 501 994 8 2 6 +36667292: 531 3 4 4 63 69 206 +3342: 26 78 3 6 9 30 2 5 8 430 +30578506: 277 742 3 850 6 +512028: 512 50 9 2 7 +1116820: 5 470 5 4 2 95 +53685674: 6 143 2 5 755 71 1 9 9 8 +1035146743981: 6 6 3 939 5 324 9 1 961 +24320006345: 200 380 32 63 45 +8974: 9 2 28 29 42 +2027: 51 609 710 629 28 +47212610: 7 68 6 205 4 61 98 32 +4887038772: 2 1 568 102 9 142 66 3 +81593: 7 8 268 8 3 1 2 5 6 7 52 +976963688: 2 1 3 5 2 8 3 534 8 77 9 6 +1087998: 6 45 6 7 3 6 10 417 3 3 8 +3685461: 82 8 61 5 90 7 1 1 33 61 +6544: 35 6 198 1 16 +305117254: 610 233 5 46 710 +4312154929: 960 199 9 38 66 49 +10980: 4 9 3 8 59 5 8 64 30 2 +15196220: 26 494 680 256 554 +1812500: 876 98 996 92 2 8 72 +8654: 791 64 9 6 8 +54194529: 774 2 7 510 22 +3252600236: 3 18 3 6 3 5 1 1 40 236 +8778363545604: 2 844 49 8 992 635 1 4 +541583: 7 74 2 21 583 +973: 5 4 5 63 809 +367055688: 63 590 1 24 562 +8989660: 4 4 65 8 5 1 4 4 85 6 5 2 +273481832: 72 3 1 491 921 4 377 +144416: 6 54 63 814 21 +8398731276: 310 3 8 6 544 20 559 +10285: 8 797 837 650 1 +9720912: 4 86 20 910 2 +1951884: 7 34 49 79 6 81 5 8 33 +78474490: 72 6 474 483 7 +191780: 4 4 83 83 6 1 7 +14083858: 6 535 86 7 87 51 3 +169532467: 7 636 7 20 1 1 68 7 2 2 7 +511152683: 28 78 4 901 8 3 6 2 1 3 +8258: 16 9 6 55 8 +30671310385: 72 94 871 121 43 +369823052445: 59 9 737 13 1 5 9 4 7 15 +4610434480: 50 76 82 548 3 5 9 835 +17336328591458: 27 96 1 82 31 957 2 57 +480962: 37 19 424 474 486 +174557: 6 45 5 1 4 633 5 25 1 5 8 +1560947212: 504 474 33 9 34 11 2 1 +616150: 8 804 32 365 15 2 +21103008: 8 9 246 5 8 7 9 2 3 3 428 +297921036: 4 9 608 103 6 +5229345: 64 817 5 48 +545929524: 1 4 9 523 8 8 333 87 +888: 10 2 74 +804375: 7 8 208 884 363 2 693 +17571080: 496 492 9 97 8 +1513531230: 5 753 402 452 778 +23059: 2 5 600 14 8 7 5 99 7 1 +9893779: 3 29 79 3 79 +13816998: 4 3 35 96 14 88 995 3 +119452126: 33 9 711 6 3 8 5 2 2 7 +304380008: 9 391 801 950 8 +79761428159: 280 4 8 62 1 7 9 7 3 4 4 2 +13848187: 138 466 1 15 142 4 +1330031: 3 664 363 +1329489: 8 571 1 404 364 987 +1002164664: 2 331 1 614 1 49 4 +16187: 1 22 701 28 33 3 +13343236: 545 785 88 300 44 3 3 +17838: 43 4 2 117 4 +423814950: 29 983 1 6 5 9 2 465 +20895899: 78 556 266 +370759: 62 1 7 582 24 +6657: 2 14 372 1 85 7 611 1 2 +44100596: 1 594 84 7 6 25 74 962 +766963: 6 1 1 669 62 +19756163682741: 91 54 22 981 8 82 741 diff --git a/day7/test_input.txt b/day7/test_input.txt new file mode 100644 index 0000000..fc6e099 --- /dev/null +++ b/day7/test_input.txt @@ -0,0 +1,9 @@ +190: 10 19 +3267: 81 40 27 +83: 17 5 +156: 15 6 +7290: 6 8 6 15 +161011: 16 10 13 +192: 17 8 14 +21037: 9 7 18 13 +292: 11 6 16 20