Skip to main content

Module day02

Module day02 

Source
Expand description

ยง1202 Program Alarm

Substituting symbols instead of numbers into the program shows that it calculates the value of:

a * noun + b * verb + c

We can isolate the value of the constants a, b, c in order to speed up subsequent calculations.

Since the equation is linear in noun and verb, we can efficiently solve part two by iterating over possible noun values and computing the corresponding verb directly.

Functionsยง

check ๐Ÿ”’
execute ๐Ÿ”’
parse
part1
part2

Type Aliasesยง

Input ๐Ÿ”’