第一道:100% s = input() count = 0 stack = [] for c in s: if not stack: stack.append(c) continue if c == stack[-1]: del stack[-1] count += 1 else: stack.append(c) print(count) 第二道:40%,直接print(0)的话,70% n, k = list(map(int, input().split())) x = list(...