Day 2, puzzle 1
This commit is contained in:
9
src/bin/d2p1.rs
Normal file
9
src/bin/d2p1.rs
Normal file
@ -0,0 +1,9 @@
|
||||
use aoc22::day2;
|
||||
use aoc22::util;
|
||||
|
||||
pub fn main() {
|
||||
let rounds = day2::parse_rounds(&util::parse_input());
|
||||
|
||||
let score = rounds.iter().map(day2::Round::score).sum::<u32>();
|
||||
println!("Total score is {}", score);
|
||||
}
|
||||
Reference in New Issue
Block a user