내가 푼 답 req = list(input()) laser = [] laser_num = 0 stick = [] result = 0 for r in req: if r == "(": laser.append(r) stick.append(r) elif r == ")": if laser: laser = [] stick.pop() laser_num += 1 else: stick.pop() result += (laser_num + 1) if not stick: laser_num = 0 print(result) 정답 req = list(input()) stack = [] result = 0 for i in range(len(req)): if req[i] == "(": stack.append(req[i]) else: ..