- Weather Observation Station 18

 Consider  and  to be two points on a 2D plane.

  •  happens to equal the minimum value in Northern Latitude (LAT_N in STATION).
  •  happens to equal the minimum value in Western Longitude (LONG_W in STATION).
  •  happens to equal the maximum value in Northern Latitude (LAT_N in STATION).
  •  happens to equal the maximum value in Western Longitude (LONG_W in STATION).

Query the Manhattan Distance between points  and  and round it to a scale of  decimal places.

Input Format

The STATION table is described as follows:

where LAT_N is the northern latitude and LONG_W is the western longitude.

MySql:

select round((abs(min(lat_n)-max(lat_n))+abs(min(long_w)-max(long_w))),4) from station

Compiler Message
Success
Input (stdin)
  • INPUT
Expected Output
  • 259.6859

Post a Comment

Previous Post Next Post