NumberSolitaire
[최초풀이]
# you can write to stdout for debugging purposes, e.g.
# print("this is a debug message")
def solution(A):
if len(A) == 2:
return sum(A)
sumA = A[0] + A[-1]
for i in range(1, len(A)-1):
if A[i] < 0:
continue
else:
sumA += A[i]
return sumA