Initial Commit
This commit is contained in:
15
rust/2021/src/day_01.rs
Normal file
15
rust/2021/src/day_01.rs
Normal file
@@ -0,0 +1,15 @@
|
||||
pub fn solve_part1(input: &str) -> &str {
|
||||
input
|
||||
}
|
||||
|
||||
pub fn solve_part2(input: &str) -> &str {
|
||||
input
|
||||
}
|
||||
|
||||
pub fn run(input: String) {
|
||||
println!("--- Part 1 ---");
|
||||
println!("Answer: {}", solve_part1(&input));
|
||||
print!("\n");
|
||||
println!("--- Part 2 ---");
|
||||
println!("Answer: {}", solve_part1(&input))
|
||||
}
|
||||
5
rust/2021/src/lib.rs
Normal file
5
rust/2021/src/lib.rs
Normal file
@@ -0,0 +1,5 @@
|
||||
mod day_01;
|
||||
|
||||
pub fn run(input: String) {
|
||||
day_01::run(input);
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
let input = std::fs::read_to_string("./input/2020/day20.txt").expect("open input file");
|
||||
advent_of_code_2021::run(input);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user