Py lion solve for day 6
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
Part 1: `1083852`
|
||||
|
||||
Part 2: `23501589`
|
||||
|
||||
[--- Day 6: Wait For It ---
|
||||
--------------------------
|
||||
|
||||
@@ -65,4 +69,36 @@ To see how much margin of error you have, determine the *number of ways you can
|
||||
Determine the number of ways you could beat the record in each race. *What do you get if you multiply these numbers together?*
|
||||
|
||||
|
||||
, --- Part Two ---
|
||||
----------------
|
||||
|
||||
As the race is about to start, you realize the piece of paper with race times and record distances you got earlier actually just has very bad [kerning](https://en.wikipedia.org/wiki/Kerning). There's really *only one race* - ignore the spaces between the numbers on each line.
|
||||
|
||||
|
||||
So, the example from before:
|
||||
|
||||
|
||||
|
||||
```
|
||||
Time: 7 15 30
|
||||
Distance: 9 40 200
|
||||
|
||||
```
|
||||
|
||||
...now instead means this:
|
||||
|
||||
|
||||
|
||||
```
|
||||
Time: 71530
|
||||
Distance: 940200
|
||||
|
||||
```
|
||||
|
||||
Now, you have to figure out how many ways there are to win this single race. In this example, the race lasts for *`71530` milliseconds* and the record distance you need to beat is *`940200` millimeters*. You could hold the button anywhere from `14` to `71516` milliseconds and beat the record, a total of `*71503*` ways!
|
||||
|
||||
|
||||
*How many ways can you beat the record in this one much longer race?*
|
||||
|
||||
|
||||
]
|
||||
Reference in New Issue
Block a user