Skip to content

Instantly share code, notes, and snippets.

@koluku
Created June 8, 2017 02:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koluku/b30c5b7eb4eed6a0838a4bad144f387e to your computer and use it in GitHub Desktop.
Save koluku/b30c5b7eb4eed6a0838a4bad144f387e to your computer and use it in GitHub Desktop.
print(input()-input())
km = int(input())/1000
if km < 0.1:
vv = 0
if 0.1 <= km <= 5:
vv = km * 10
if 6 <= km <= 30:
vv = km + 50
if 35 <= km <= 70:
vv = (km - 30) / 5 + 80
if 70 < km:
vv = 89
print('{:02.0f}'.format(vv))
deg, dis = map(int, input().split())
dirs = ["N", "NNE", "NE", "ENE", "E", "ESE", "SE", "SSE", "S", "SSW", "SW", "WSW", "W", "WNW", "NW", "NNW"]
wps = [2, 15, 33, 54, 79, 107, 138, 171, 207, 244, 284, 326]
w = 0
for n in wps:
if int(dis/6 + 0.5) > n:
w += 1
dir = dirs[(deg * 10 +1125) % 36000 // 2250] if w > 0 else "C"
print(dir, w)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment