Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lon = float(input().replace(',', '.'))
- lat = float(input().replace(',', '.'))
- n = int(input())
- for i in range(n):
- defib = input()
- dane = defib.split(";")
- lon_d = float(dane[4].replace(',', '.'))
- lat_d = float(dane[5].replace(',', '.'))
- x = (lon_d - lon)*math.cos((lat + lat_d) / 2)
- y = lat_d - lat
- d = math.sqrt(x**2 + y**2) * 6371
- # 4- lon
- #5- lat
- print(d, file=sys.stderr)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement