Better output for each problem.
This commit is contained in:
parent
da873ef463
commit
29956ee857
18
src/main.rs
18
src/main.rs
@ -1,10 +1,16 @@
|
||||
use advent_of_code::{prob1, prob2};
|
||||
|
||||
fn main() {
|
||||
let args: Vec<String> = std::env::args().collect();
|
||||
let file_path = args
|
||||
.get(1)
|
||||
.expect("Please provide an argument on command-line.");
|
||||
let max = prob2::solve_part2(file_path);
|
||||
println!("{max}");
|
||||
{
|
||||
let file_path = "prob1.txt";
|
||||
let max_part1 = prob1::solve_part1(file_path);
|
||||
let max_part2 = prob1::solve_part2(file_path);
|
||||
println!("Solution for problem 1 part 1: {max_part1}\nSolution for problem 1 part 2: {max_part2}");
|
||||
}
|
||||
{
|
||||
let file_path = "prob2_part1.txt";
|
||||
let max_part1 = prob2::solve_part1(file_path);
|
||||
let max_part2 = prob2::solve_part2(file_path);
|
||||
println!("Solution for problem 2 part 1: {max_part1}\nSolution for problem 2 part 2: {max_part2}");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user