Day 11, puzzle 1

This commit is contained in:
jazzpi
2022-12-15 21:04:47 +01:00
parent b7005f244d
commit 4f5d6d7fa0
5 changed files with 464 additions and 0 deletions

22
src/bin/d11p1.rs Normal file
View File

@ -0,0 +1,22 @@
use aoc22::{
day11::{self, monkey_business},
util,
};
const N_ROUNDS: usize = 20;
pub fn main() {
env_logger::init();
let monkeys = day11::parse_monkeys(&util::parse_input());
for _ in 0..20 {
day11::do_round(&monkeys);
}
println!(
"Monkey business after {} rounds is {}",
N_ROUNDS,
monkey_business(&monkeys)
);
}