advent-of-code/2019/13/src/main.rs

13 lines
256 B
Rust
Raw Normal View History

2019-12-13 08:24:01 +01:00
use intcode::*;
fn main() {
let part1 = IntComputer::new(read_input(), 0, vec![])
.get_all_outputs()
.into_iter()
.skip(2)
.step_by(3)
.filter(|s| s == &2)
.count();
println!("Part 1: {}", part1);
}