day 3 part 2 (C)

This commit is contained in:
2021-12-04 16:04:51 +01:00
parent cbe3616422
commit 401b567e20
3 changed files with 108 additions and 20 deletions

View File

@@ -33,12 +33,7 @@ The epsilon rate is calculated in a similar way; rather than use the most common
Use the binary numbers in your diagnostic report to calculate the gamma rate and epsilon rate, then multiply them together. What is the power consumption of the submarine? (Be sure to represent your answer in decimal, not binary.)
Your puzzle answer was 3901196.
The first half of this puzzle is complete! It provides one gold star: *
--- Part Two ---
Next, you should verify the life support rating, which can be determined by multiplying the oxygen generator rating by the CO2 scrubber rating.
@@ -73,3 +68,7 @@ Then, to determine the CO2 scrubber rating value from the same example above:
Finally, to find the life support rating, multiply the oxygen generator rating (23) by the CO2 scrubber rating (10) to get 230.
Use the binary numbers in your diagnostic report to calculate the oxygen generator rating and CO2 scrubber rating, then multiply them together. What is the life support rating of the submarine? (Be sure to represent your answer in decimal, not binary.)
Your puzzle answer was 4412188.
Both parts of this puzzle are complete! They provide two gold stars: **