Day 2, puzzle 1

This commit is contained in:
jazzpi
2022-12-13 14:00:48 +01:00
parent 4c040d67b3
commit 9c3b97a521
3 changed files with 94 additions and 0 deletions

9
src/bin/d2p1.rs Normal file
View 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);
}