Module day01

Source
Expand description

§The Tyranny of the Rocket Equation

The title of the problem is a reference to the real life equation.

Functions§

parse
The iter_unsigned utility method extracts and parses numbers from surrounding text.
part1
Calculate fuel requirements following the formula.
part2
Calculate the fuel requirements taking into account that fuel needs more fuel to lift it. Mass of 8 or below results in zero or negative fuel so we can stop.