Arc on the sphere
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
On the surface of the planet is a ball of radius R, given two points for its latitude and longitude. Find the minimum path length along the surface of this planet from one point to another.
Input
The first line is the number of R, the second line are given the latitude and longitude of first point in the third row - latitude and longitude of second point.
Latitude in degrees from -90 to 90, longitude in degrees from -180 to 180, 100 ≤ R ≤ 10000, all numbers are real.
Output
Print the length of the path with the two characters after the decimal point.
Examples
Input #1
Answer #1
Submissions 183
Acceptance rate 37%