def solution(A): add_num = 0 add_num_list = [] for num in A: add_num += num add_num_list.append(add_num) if add_num < 0: add_num = 0 return max(add_num_list)
결과는 여기에