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

22 lines
313 B
Rust
Raw Normal View History

2019-12-26 15:28:43 +01:00
use intcode::*;
fn main() {
let program = "NOT A J
NOT B T
OR T J
NOT C T
OR T J
AND D J
WALK
"
.chars()
.map(|c| c as i64)
.rev()
.collect();
let part1 = IntComputer::new(read_input(), 0, program)
.get_all_outputs()
.pop()
.unwrap();
println!("{}", part1);
}