2023-10: Add day 10
This commit is contained in:
parent
100fd47491
commit
35728df923
|
@ -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")
|
||||
}
|
||||
}
|
|
@ -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()
|
||||
}
|
Loading…
Reference in New Issue