AoC2023/day6/math6
2023-12-08 14:30:46 +01:00

20 lines
268 B
Text

T = 7
D = 9
d = t * (T - t)
d = tT - t²
for which range of t is d > D?
0 >= t >= T
10 = t7 - t²
10 = - t² + t7
-10 = t² - 7t
3.5² - 10 = t² - 7t + 3.5²
49/4 - 10 = t² - 7t + 49/4
9/4 = (t - 7/2)²
t - 7/2 = 3/2 or -3/2
t = 10/2 or 4/2
5, 2
(5 + 1) - 2 = 4