We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
with dist as (
select min(lat_n) as a,min(long_w) as b,max(lat_n) as x,
max(long_w) as y from station)
select cast(sqrt(power((x-a),2) + power((y-b),2)) as decimal(10,4)) from dist
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Weather Observation Station 19
You are viewing a single comment's thread. Return to all comments →
in Ms Sql
with dist as ( select min(lat_n) as a,min(long_w) as b,max(lat_n) as x, max(long_w) as y from station) select cast(sqrt(power((x-a),2) + power((y-b),2)) as decimal(10,4)) from dist