import sys
test_cases = open(sys.argv[1], 'r')
for test in test_cases:
cord = map(int, test.split())
sol = ""
if cord[1] > cord[3]:
sol += "S"
elif cord[1] < cord[3]:
sol += "N"
if cord[0] > cord[2]:
sol += "W"
elif cord[0] < cord[2]:
sol += "E"
if cord[0] == cord[2] and cord[1] == cord[3]:
sol += "here"
print sol
test_cases.close()
test_cases = open(sys.argv[1], 'r')
for test in test_cases:
cord = map(int, test.split())
sol = ""
if cord[1] > cord[3]:
sol += "S"
elif cord[1] < cord[3]:
sol += "N"
if cord[0] > cord[2]:
sol += "W"
elif cord[0] < cord[2]:
sol += "E"
if cord[0] == cord[2] and cord[1] == cord[3]:
sol += "here"
print sol
test_cases.close()
No comments:
Post a Comment