第一题一样 python a了第一题 str1 = input() def count(s): left_list = [] right_list = [] n=0 for item in s: if item == '(&(234)#39;: left_list.append(item) elif item == ')': if len(left_list)==0: right_list.append(item) else: left_list.pop() n+=1 print(n,len(left_list),len(right_list)) count(str1)
1 2

相关推荐

面我面我面我_秋招版:不是戈门,干哪来了,这就是java嘛
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务