Cody

Problem 43277. Distance between Berlin and New York in km

Use Pythagoras to calculate the distance between two locations in km (based on their respective longitudes and latitudes).

For example: Berlin's coordinates are [52.5200°, 13.4050°]. New York's coordinates are [40.7128°, 74.0059°].

The two cities are approx 4811 km apart, according to Pythagoras (not taking into account factors such as the Earth's curvature).

HINTS:

- The earth's radius is assumed as 6371 km.

- Degrees to Radians: rad = deg * pi/180

Solution Stats

17.39% Correct | 82.61% Incorrect
Last Solution submitted on Sep 26, 2018