It worked for me as well:
"""
To solve this problem, we need to find the speed at which John and Jill are moving apart from each other. Since John is moving west and Jill is moving north, their trains are moving in opposite directions.
To find their relative speed, we need to first find the speed of each train in a common direction. Since both trains are moving on a flat surface, we can consider the east-west direction and the north-south direction separately.
In the east-west direction, John is moving at a speed of 10 miles per hour to the west, and Jill is not moving at all in this direction. Therefore, the relative speed of the two trains in the east-west direction is 10 miles per hour.
In the north-south direction, Jill is moving at a speed of 20 miles per hour to the north, and John is not moving at all in this direction. Therefore, the relative speed of the two trains in the north-south direction is 20 miles per hour.
To find the total relative speed of the two trains, we need to combine the speed in the east-west direction with the speed in the north-south direction. Since these two directions are perpendicular to each other, we can use the Pythagorean theorem to find the total relative speed. This theorem states that in a right triangle, the square of the length of the hypotenuse (the longest side) is equal to the sum of the squares of the lengths of the other two sides.
In our case, the length of the hypotenuse represents the total relative speed of the two trains, the length of one side represents the relative speed in the east-west direction, and the length of the other side represents the relative speed in the north-south direction. Therefore, we can use the Pythagorean theorem to find the total relative speed of the two trains as follows:
Total relative speed = √(east-west speed² + north-south speed²)
Substituting the known values, we get:
Total relative speed = √(10² + 20²) = √(100 + 400) = √500 = 22.36
Therefore, John and Jill are moving apart from each other at a speed of 22.36 miles per hour.
"""
Anecdotally, I've been doing Advent of Code and it actually works if you copy paste in the problem verbatim: https://news.ycombinator.com/item?id=33821092