알고리즘 문제 풀기/BOJ
BOJ 1541 - 잃어버린 괄호
bug_maker
2019. 12. 27. 16:43
https://www.acmicpc.net/problem/1541
BOJ 1541 - 잃어버린 괄호
작성언어: Python3
exp = input().split('-')itemList = []for t in exp: temp = list(map(int, t.split('+'))) itemList.append(sum(temp))total = itemList[0]for item in itemList[1:]: total -= itemprint(total)pc 환경에서 코드를 보는 것을 권장합니다.