advent_of_code/year2016/
day12.rs1use super::assembunny::{Computer, Word};
2use crate::input::Input;
3
4pub fn solve(input: &Input) -> Result<Word, String> {
5 let mut computer = Computer::parse(input.text)?;
6 computer.registers[2] = input.part_values(0, 1);
7 Ok(computer.execute())
8}
9
10#[test]
11pub fn tests() {
12 use crate::input::{test_part_one, test_part_two};
13
14 let real_input = include_str!("day12_input.txt");
15 test_part_one!(real_input => 318_020);
16 test_part_two!(real_input => 9_227_674);
17}