Skip to content

Instantly share code, notes, and snippets.

@dongwooklee96
Created May 15, 2021 15:56
Show Gist options
  • Save dongwooklee96/ee95024c912b814b8ee68cdb967828f8 to your computer and use it in GitHub Desktop.
Save dongwooklee96/ee95024c912b814b8ee68cdb967828f8 to your computer and use it in GitHub Desktop.
def solve(numbers: list):
tot = sum(numbers)
if tot == 0:
return 0
elif tot > 0:
return '+'
elif tot < 0:
return '-'
if __name__ == '__main__':
for i in range(3):
n = int(input())
numbers = []
for j in range(n):
numbers.append(int(input()))
print(solve(numbers))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment