This commit is contained in:
2023-11-18 16:45:50 +01:00
parent 14d00e16d5
commit 3af5af2461
4 changed files with 32 additions and 0 deletions
+4
View File
@@ -2,3 +2,7 @@
node_modules
*.txt
.env*
# Added by cargo
/target
+10
View File
@@ -0,0 +1,10 @@
fn main() {
// Part A
let result: u32 = include_str!("../input.txt")
.trim()
.split("\n\n")
.map(|x| x.lines().map(|x| x.parse::<u32>().unwrap()).sum())
.max()
.unwrap();
println!("A: {}", result);
}
Generated
+7
View File
@@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "advent-of-code"
version = "0.1.0"
+11
View File
@@ -0,0 +1,11 @@
[package]
name = "advent-of-code"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[[bin]]
name = "2022-01"
path = "./2022/01/rust/main.rs"