Function advent_solutions::advent2017::day08::part1
[−]
[src]
pub fn part1(instructions: &[Instruction]) -> isize
What is the largest value in any register after completing the instructions in your puzzle input?
b inc 5 if a > 1
a inc 1 if b < 5
c dec -10 if a >= 1
c inc -20 if c == 10
After this process, the largest value in any register is 1.
let instructions = Instruction::list_from_bytes(input) .to_result() .unwrap(); assert_eq!(part1(&instructions), 1);