Coach Pranjal and Coach Trevor are coaching their soccer players on the Cartesian plane. Both decide to do running exercises to get their players in shape.
Coach Pranjal calls off the numbers in the set and Coach Trevor calls off the numbers in the set . Each coach tells his players to start at the origin and run in a rectangular spiral with side lengths of 1,2,3, and 4 digit combinations of the numbers in each coach's respective set with no repeated digits.
For example, Pranjal's players would run 5432 paces east, 5423 paces north, 5342 paces west. . . . 2345 paces south, 543 paces east, 542 paces north. . . . And finally 2 paces south.
Coach Trevor tells his players to do the same, except they travel 6543 paces east, 6534 paces north. . . .
When both teams, tired beyond belief, finish their drills, they both stop to rest for a while.
Find the distance between where both teams take their rests correct to 2 decimal places.
Problem credit/inspiration by Pranjal Jain
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Python 2.7: