advent-of-code/problems/src/main.rs

14 lines
301 B
Rust
Raw Normal View History

mod day1;
fn main() {
let day = std::env::args().skip(1).next();
let result = match day.as_ref().map(|v| v.as_ref()) {
2022-12-01 14:46:04 +00:00
Some("1a") => day1::part1(),
Some("1b") => day1::part2(),
_ => panic!("unrecognized day"),
};
2022-12-01 14:46:04 +00:00
println!("[{}] {}", day.unwrap(), result);
}