1
0

Better output for each problem.

This commit is contained in:
Pcornat 2022-12-04 21:03:48 +01:00
parent da873ef463
commit 29956ee857
Signed by: Pcornat
GPG Key ID: 2F3932FF46D9ECA0

View File

@ -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}");
}
}