프로그래머스
Lv.3
-등굣길
-110 옮기기
Lv.4
-사칙연산
arr = input().split()
minmax = [0, 0]
sum_value = 0
for idx in range(len(arr)-1, -1, -1):
if arr[idx] == '+':
continue
elif arr[idx] == '-':
tempmin, tempmax = minmax
minmax[0] = min(-(sum_value + tempmax), -sum_value+tempmin)
minus_v = int(arr[idx+1])
minmax[1] = max(-(sum_value+tempmin), -minus_v+(sum_value-minus_v)+tempmax)
sum_value = 0
elif int(arr[idx]) >= 0:
sum_value += int(arr[idx])
minmax[1] = sum_value
print(minmax[1])
-행렬과 연산
def shiftrow():
def rotate():
def solution(rc, operations):
answer = [[]]
data = []
for i in range(len(operation)):
if operation[i] == 'ShiftRow':
else:
return answer