Skip to content
Snippets Groups Projects
10.py 308 B
Newer Older
hacker717's avatar
hacker717 committed
x, y = 0, 0
while True:
    s = input()
    if s == "СТОП":
        break
    elif s == "СЕВЕР":
        y += int(input())
    elif s == "ЮГ":
        y -= int(input())
    elif s == "ЗАПАД":
        x -= int(input())
    elif s == "ВОСТОК":
        x += int(input())

print(y)
print(x)