-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
https://www.acmicpc.net/problem/1541
formula = input().split('-')
arr = []
for i in formula:
if '+' not in i:
arr.append(int(i))
else:
temp = 0
for j in i.split('+'):
temp += int(j)
arr.append(temp)
ans = arr.pop(0)
for i in arr:
ans -= i
print(ans)