@@ -0,0 +1,497 @@
+class Solution %7B%0A    public String removeOuterParentheses(String S) %7B%0A        %0A        // %E7%94%A8%E8%AE%A1%E6%95%B0%E5%99%A8open%E8%A1%A8%E7%A4%BA%22%E6%A0%88%22%E5%86%85%E5%B7%A6%E4%BE%A7%E6%8B%AC%E5%8F%B7%E7%9A%84%E6%95%B0%E9%87%8F%0A        StringBuffer ans = new StringBuffer();%0A        int open = 0;%0A        %0A        for (char ch : S.toCharArray()) %7B%0A            if (ch == ')') %7B%0A                open--;%0A            %7D%0A            if (open %3E 0) %7B%0A                ans.append(ch);%0A            %7D%0A            if (ch == '(') %7B%0A                open++;%0A            %7D%0A        %7D%0A        %0A        return ans.toString();%0A    %7D%0A%7D

add no.1021