2023-10: Add day 10

This commit is contained in:
Mathis 2023-12-21 19:56:09 +01:00
parent 100fd47491
commit 35728df923
2 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,25 @@
pub mod part_one;
//pub mod part_two;
//pub mod common;
use crate::utils::solution::Solution;
use crate::utils::input_reader;
pub struct DaySolution ;
impl Solution for DaySolution {
fn input_path(&self) -> &'static str {
"input/2023/day_10/input.txt"
}
fn part_one(&self) -> String {
input_reader::read_input_file(self.input_path(), part_one::part_one)
}
fn part_two(&self) -> String {
//input_reader::read_input_file(self.input_path, part_two::part_two)
String::from("Not implemented")
}
}

View File

@ -0,0 +1,7 @@
pub fn part_one(input_lines: Vec<String>) -> String {
input_lines
.iter()
.map(|line| line.parse::<i32>().unwrap())
.sum::<i32>()
.to_string()
}