mirror of
https://github.com/theoludwig/advent_of_code.git
synced 2025-05-18 19:27:51 +02:00
test: add cases for input.txt
This commit is contained in:
@ -32,12 +32,6 @@ In the example above, games 1, 2, and 5 would have been **possible** if the bag
|
||||
|
||||
Determine which games would have been possible if the bag had been loaded with only 12 red cubes, 13 green cubes, and 14 blue cubes. **What is the sum of the IDs of those games?**
|
||||
|
||||
To begin, [get your puzzle input](./input.txt).
|
||||
|
||||
Your puzzle answer was `2617`.
|
||||
|
||||
**The first half of this puzzle is complete! It provides one gold star: `*`.**
|
||||
|
||||
## Instructions - Part 2
|
||||
|
||||
The Elf says they've stopped producing snow because they aren't getting any **water**! He isn't sure why the water stopped; however, he can show you how to get to the water source to check it out for yourself. It's just up ahead!
|
||||
@ -63,7 +57,3 @@ Game 5: 6 red, 1 blue, 3 green; 2 blue, 1 red, 2 green
|
||||
The **power** of a set of cubes is equal to the numbers of red, green, and blue cubes multiplied together. The power of the minimum set of cubes in game 1 is `48`. In games 2-5 it was `12`, `1560`, `630`, and `36`, respectively. Adding up these five powers produces the sum **`2286`**.
|
||||
|
||||
For each game, find the minimum set of cubes that must have been present. **What is the sum of the power of these sets?**
|
||||
|
||||
Your puzzle answer was `59795`.
|
||||
|
||||
**Both parts of this puzzle are complete! They provide two gold stars: `**`.**
|
||||
|
@ -185,4 +185,14 @@ mod day_2_tests {
|
||||
fn test_part_2_example() {
|
||||
assert_eq!(part_2(include_str!("../input_example_1.txt")), 2286);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_part_1() {
|
||||
assert_eq!(part_1(include_str!("../input.txt")), 2617);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_part_2() {
|
||||
assert_eq!(part_2(include_str!("../input.txt")), 59795);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user