mirror of
https://github.com/cupcakearmy/advent-of-code.git
synced 2024-11-01 16:14:14 +01:00
11 lines
252 B
Rust
11 lines
252 B
Rust
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);
|
|
}
|