摘要: #1括号匹配问题s=input()match={"]":"[",")":"("}stack=[]i=len(s)for ch in s: if ch in ["(","["]: stack.append(ch) else: if stack==[]: i=i elif stack[-1] == ma 阅读全文
posted @ 2020-08-23 21:29 The-Chosen-One 阅读(885) 评论(0) 推荐(0) 编辑