Want to get involved? We're always looking for ideas and content for Weekly Challenges.
SUBMIT YOUR IDEAThis challenge was submitted by our Community user @RemcoV .
Thank you, Remco Visser!
How efficient is the Formula 1 race series?
A Formula One (F1) season consists of a series of races known as Grand Prix. Grand Prix races occur on specialized circuits or closed public roads in multiple countries and continents worldwide. In this challenge, we will analyze how efficient the Grand Prix organizers are when assigning the circuits and the official order (round number) in which the F1 teams will participate.
For this challenge, you are provided with two datasets:
Circuit Names: This dataset contains the circuit names and the corresponding round number.
Circuit Location: This dataset contains the circuit names, the countries where they are located, and the latitude and longitude of their location.
The challenge is to:
Determine how many kilometers Formula 1 teams must travel to complete all 23 rounds when F1 teams follow the round numbers determined by the organizers. This means starting at round 1, traveling to round 2, and so on, all the way to round 23.
Determine how many kilometers Formula 1 teams must travel to complete all 23 rounds when the F1 teams travel to the nearest circuit, starting in Bahrain, instead of following the round numbers assigned by the organizers.
Source: http://ergast.com/mrd/
Cant get the miles to match..
My solution.
But my answer for 2 is smaller than the sample output.
My answer is
Maybe even more efficient?
Not too bad. Broke up the two questions into two iterative macros to make it easier to debug.
The optimized distance is different compared to the provided answer.