problem 10 template

master
mitchellhansen 4 years ago
parent 1cdb2f668f
commit 12dda2e0a8

@ -2,25 +2,9 @@
extern crate reqwest; extern crate reqwest;
extern crate tempfile; extern crate tempfile;
use crate::problem1::lib::Problem1; use crate::problem10::lib::Problem10;
use crate::problem2::lib::Problem2;
use crate::problem3::lib::Problem3;
use crate::problem4::lib::Problem4;
use crate::problem5::lib::Problem5;
use crate::problem6::lib::Problem6;
use crate::problem7::lib::Problem7;
use crate::problem8::lib::Problem8;
use crate::problem9::lib::Problem9;
mod problem1; mod problem10;
mod problem2;
mod problem3;
mod problem4;
mod problem5;
mod problem6;
mod problem7;
mod problem8;
mod problem9;
mod util; mod util;
@ -34,7 +18,7 @@ pub trait Problem {
} }
fn main() { fn main() {
let problem9 = Problem9::new(&util::get_problem(9)); let problem10 = Problem10::new(&util::get_problem(10));
//problem9.run_part1(); problem10.run_part1();
problem9.run_part2(); problem10.run_part2();
} }

@ -0,0 +1,35 @@
use crate::Problem;
pub struct Problem10 {
number_list: Vec<u64>,
}
impl Problem10 {}
impl Problem for Problem10 {
fn new(input: &String) -> Self {
Problem10 {
number_list: input
.split("\n")
.filter_map(|s| {
let s = s.trim();
if !s.is_empty() {
Some(s.parse::<u64>().unwrap())
} else {
None
}
}).collect(),
}
}
fn run_part1(&self) {
}
fn run_part2(&self) {
}
}

@ -0,0 +1 @@
pub mod lib;
Loading…
Cancel
Save