Last active
December 24, 2020 17:46
-
-
Save sampletext32/97150c360a26164816a901dc13a5aee9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if __name__ == "__main__": | |
a = [] | |
n = int(input()) | |
for i in range(n): | |
element = int(input()) | |
a.append(element) | |
index = 0 | |
maxElement = a[0] | |
for i in range(n): | |
if a[i] > maxElement: | |
maxElement = a[i] | |
index = i | |
s1 = sum(a[:index]) | |
s2 = sum(a[index + 1:]) | |
if s1 > s2: | |
print("First sum is bigger") | |
elif s2 > s1: | |
print("Second sum is bigger") | |
else: | |
print("Equal") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment