알고리즘/HackerRank
[HackerRank] Weather Observation Station 18 오라클 풀이
mndev
2024. 1. 26. 13:24
문제링크
Weather Observation Station 18 | HackerRank
Query the Manhattan Distance between two points, round or truncate to 4 decimal digits.
www.hackerrank.com
풀이
LAT_N의 최대, 최소 값을 뺀 값과 LONG_W의 최대, 최소 뺀 값을 더해주면 문제 조건에 맞게 조회될 수 있다.
코드
select round((max(LAT_N)-min(LAT_N))+(max(LONG_W) - min(LONG_W)),4)
from station;